[Modify] Throw an exception

This commit is contained in:
sta 2019-12-16 21:47:36 +09:00
parent 92b2bcbaf0
commit 77374c3a9c

View File

@ -249,6 +249,11 @@ namespace WebSocketSharp.Net
if (_disposed) if (_disposed)
throw new ObjectDisposedException (GetType ().ToString ()); throw new ObjectDisposedException (GetType ().ToString ());
if (_headersSent) {
var msg = "The response is already being sent.";
throw new InvalidOperationException (msg);
}
_contentEncoding = value; _contentEncoding = value;
} }
} }