[Fix] Move it
This commit is contained in:
parent
f36083f8ff
commit
ff5c62eedb
@ -302,9 +302,8 @@ namespace WebSocketSharp.Net
|
||||
conn._lastListener = lsnr;
|
||||
}
|
||||
|
||||
conn._contextBound = true;
|
||||
if (!lsnr.RegisterContext (conn._context))
|
||||
conn._contextBound = false;
|
||||
if (lsnr.RegisterContext (conn._context))
|
||||
conn._contextBound = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -587,6 +587,9 @@ namespace WebSocketSharp.Net
|
||||
if (!_listening)
|
||||
return false;
|
||||
|
||||
if (!Authenticate (context))
|
||||
return false;
|
||||
|
||||
lock (_ctxRegistrySync) {
|
||||
if (!_listening)
|
||||
return false;
|
||||
|
@ -179,18 +179,6 @@ namespace WebSocketSharp.Net
|
||||
|
||||
internal void Complete (HttpListenerContext context, bool syncCompleted)
|
||||
{
|
||||
try {
|
||||
var lsnr = context.Listener;
|
||||
if (!lsnr.Authenticate (context)) {
|
||||
lsnr.BeginGetContext (this);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
Complete (ex);
|
||||
return;
|
||||
}
|
||||
|
||||
_context = context;
|
||||
_syncCompleted = syncCompleted;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user