File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments