[Modify] Polish it

This commit is contained in:
sta 2021-08-30 20:17:16 +09:00
parent 835fdaeacb
commit f11a8c30c2

View File

@ -822,8 +822,10 @@ namespace WebSocketSharp.Server
{ {
while (true) { while (true) {
TcpClient cl = null; TcpClient cl = null;
try { try {
cl = _listener.AcceptTcpClient (); cl = _listener.AcceptTcpClient ();
ThreadPool.QueueUserWorkItem ( ThreadPool.QueueUserWorkItem (
state => { state => {
try { try {
@ -845,6 +847,7 @@ namespace WebSocketSharp.Server
catch (SocketException ex) { catch (SocketException ex) {
if (_state == ServerState.ShuttingDown) { if (_state == ServerState.ShuttingDown) {
_log.Info ("The underlying listener is stopped."); _log.Info ("The underlying listener is stopped.");
break; break;
} }