We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61d36c3 commit 32f8084Copy full SHA for 32f8084
nanoFramework.WebServer/WebServer.cs
@@ -593,8 +593,16 @@ private void StartListener()
593
context.Response.ContentLength64 = 0;
594
}
595
596
- context.Response.Close();
597
- context.Close();
+ // When context has been handed over to WebsocketServer, it will be null at this point
+ if (context.Response == null)
598
+ {
599
+ //do nothing this is a websocket that is managed by a websocketserver that is responsible for the context now.
600
+ }
601
+ else
602
603
+ context.Response.Close();
604
+ context.Close();
605
606
607
608
if (!isRoute)
@@ -611,7 +619,7 @@ private void StartListener()
611
619
612
620
613
621
context.Response.Close();
614
622
615
623
616
624
}).Start();
617
625
0 commit comments