[Modify] Polish it
This commit is contained in:
parent
206f1f4730
commit
054e3ef03e
@ -765,11 +765,18 @@ namespace WebSocketSharp.Net
|
|||||||
public HttpListenerContext GetContext ()
|
public HttpListenerContext GetContext ()
|
||||||
{
|
{
|
||||||
CheckDisposed ();
|
CheckDisposed ();
|
||||||
if (_prefixes.Count == 0)
|
|
||||||
throw new InvalidOperationException ("The listener has no URI prefix on which listens.");
|
|
||||||
|
|
||||||
if (!_listening)
|
if (_prefixes.Count == 0) {
|
||||||
throw new InvalidOperationException ("The listener hasn't been started.");
|
var msg = "The listener has no URI prefix on which listens.";
|
||||||
|
|
||||||
|
throw new InvalidOperationException (msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_listening) {
|
||||||
|
var msg = "The listener has not been started.";
|
||||||
|
|
||||||
|
throw new InvalidOperationException (msg);
|
||||||
|
}
|
||||||
|
|
||||||
var ares = BeginGetContext (new HttpListenerAsyncResult (null, null));
|
var ares = BeginGetContext (new HttpListenerAsyncResult (null, null));
|
||||||
ares.InGet = true;
|
ares.InGet = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user