[Modify] Polish it
This commit is contained in:
parent
ed12ccaf21
commit
6a4b027e0a
@ -866,8 +866,9 @@ namespace WebSocketSharp.Server
|
|||||||
ThreadPool.QueueUserWorkItem (
|
ThreadPool.QueueUserWorkItem (
|
||||||
state => {
|
state => {
|
||||||
try {
|
try {
|
||||||
var ctx =
|
var ctx = new TcpListenerWebSocketContext (
|
||||||
cl.GetWebSocketContext (null, _secure, _sslConfigInUse, _log);
|
cl, null, _secure, _sslConfigInUse, _log
|
||||||
|
);
|
||||||
|
|
||||||
if (!ctx.Authenticate (_authSchemes, _realmInUse, _userCredFinder))
|
if (!ctx.Authenticate (_authSchemes, _realmInUse, _userCredFinder))
|
||||||
return;
|
return;
|
||||||
@ -875,7 +876,7 @@ namespace WebSocketSharp.Server
|
|||||||
processRequest (ctx);
|
processRequest (ctx);
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
_log.Fatal (ex.Message);
|
_log.Error (ex.Message);
|
||||||
_log.Debug (ex.ToString ());
|
_log.Debug (ex.ToString ());
|
||||||
|
|
||||||
cl.Close ();
|
cl.Close ();
|
||||||
@ -885,7 +886,7 @@ namespace WebSocketSharp.Server
|
|||||||
}
|
}
|
||||||
catch (SocketException ex) {
|
catch (SocketException ex) {
|
||||||
if (_state == ServerState.ShuttingDown) {
|
if (_state == ServerState.ShuttingDown) {
|
||||||
_log.Info ("The receiving is stopped.");
|
_log.Info ("The underlying listener is stopped.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user