socket pooling, asyncstate cleanups
This commit is contained in:
parent
a8acb6bd9d
commit
536e73b8df
4 changed files with 60 additions and 49 deletions
|
|
@ -245,6 +245,9 @@ namespace Server
|
|||
{
|
||||
}
|
||||
|
||||
if ( SocketPool.Created )
|
||||
SocketPool.Destroy();
|
||||
|
||||
Console.WriteLine( "This exception is fatal, press return to exit" );
|
||||
Console.ReadLine();
|
||||
}
|
||||
|
|
@ -327,6 +330,9 @@ namespace Server
|
|||
if( timerThread.ThreadState != System.Threading.ThreadState.Unstarted )
|
||||
timerThread.Join();
|
||||
|
||||
if( SocketPool.Created )
|
||||
SocketPool.Destroy();
|
||||
|
||||
Console.WriteLine( "done" );
|
||||
}
|
||||
|
||||
|
|
@ -420,6 +426,8 @@ namespace Server
|
|||
return;
|
||||
}
|
||||
|
||||
SocketPool.Create();
|
||||
|
||||
MessagePump ms = m_MessagePump = new MessagePump( new Listener( Listener.Port ) );
|
||||
|
||||
timerThread.Start();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue