[Modify] Polish it
This commit is contained in:
parent
835fdaeacb
commit
f11a8c30c2
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user