[Modify] Polish it

This commit is contained in:
sta 2020-12-26 22:25:05 +09:00
parent f5d9dffc95
commit 1a2a4d7845

View File

@ -936,13 +936,16 @@ namespace WebSocketSharp.Server
{
while (true) {
HttpListenerContext ctx = null;
try {
ctx = _listener.GetContext ();
ThreadPool.QueueUserWorkItem (
state => {
try {
if (ctx.Request.IsUpgradeRequest ("websocket")) {
processRequest (ctx.AcceptWebSocket (null));
return;
}
@ -959,10 +962,12 @@ namespace WebSocketSharp.Server
}
catch (HttpListenerException) {
_log.Info ("The underlying listener is stopped.");
break;
}
catch (InvalidOperationException) {
_log.Info ("The underlying listener is stopped.");
break;
}
catch (Exception ex) {