[Modify] Throw an exception

This commit is contained in:
sta 2019-12-21 22:10:26 +09:00
parent 197166b48b
commit 889e6d30b6

View File

@ -568,6 +568,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);
}
if (value == null) { if (value == null) {
_location = null; _location = null;
return; return;