Skip to content

Commit 6a4b027

Browse files
committed
[Modify] Polish it
1 parent ed12cca commit 6a4b027

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

websocket-sharp/Server/WebSocketServer.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -866,16 +866,17 @@ private void receiveRequest ()
866866
ThreadPool.QueueUserWorkItem (
867867
state => {
868868
try {
869-
var ctx =
870-
cl.GetWebSocketContext (null, _secure, _sslConfigInUse, _log);
869+
var ctx = new TcpListenerWebSocketContext (
870+
cl, null, _secure, _sslConfigInUse, _log
871+
);
871872

872873
if (!ctx.Authenticate (_authSchemes, _realmInUse, _userCredFinder))
873874
return;
874875

875876
processRequest (ctx);
876877
}
877878
catch (Exception ex) {
878-
_log.Fatal (ex.Message);
879+
_log.Error (ex.Message);
879880
_log.Debug (ex.ToString ());
880881

881882
cl.Close ();
@@ -885,7 +886,7 @@ private void receiveRequest ()
885886
}
886887
catch (SocketException ex) {
887888
if (_state == ServerState.ShuttingDown) {
888-
_log.Info ("The receiving is stopped.");
889+
_log.Info ("The underlying listener is stopped.");
889890
break;
890891
}
891892

0 commit comments

Comments
 (0)