Skip to content

Commit 1a2a4d7

Browse files
committed
[Modify] Polish it
1 parent f5d9dff commit 1a2a4d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

websocket-sharp/Server/HttpServer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,13 +936,16 @@ private void receiveRequest ()
936936
{
937937
while (true) {
938938
HttpListenerContext ctx = null;
939+
939940
try {
940941
ctx = _listener.GetContext ();
942+
941943
ThreadPool.QueueUserWorkItem (
942944
state => {
943945
try {
944946
if (ctx.Request.IsUpgradeRequest ("websocket")) {
945947
processRequest (ctx.AcceptWebSocket (null));
948+
946949
return;
947950
}
948951

@@ -959,10 +962,12 @@ private void receiveRequest ()
959962
}
960963
catch (HttpListenerException) {
961964
_log.Info ("The underlying listener is stopped.");
965+
962966
break;
963967
}
964968
catch (InvalidOperationException) {
965969
_log.Info ("The underlying listener is stopped.");
970+
966971
break;
967972
}
968973
catch (Exception ex) {

0 commit comments

Comments
 (0)