|
@@ -85,7 +85,7 @@ namespace SMBLibrary.Server
|
|
|
m_connectionManager.ReleaseAllConnections();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
private void ConnectRequestCallback(IAsyncResult ar)
|
|
|
{
|
|
|
Socket listenerSocket = (Socket)ar.AsyncState;
|
|
@@ -101,11 +101,11 @@ namespace SMBLibrary.Server
|
|
|
}
|
|
|
catch (SocketException ex)
|
|
|
{
|
|
|
- const int WSAECONNRESET = 10054;
|
|
|
-
|
|
|
-
|
|
|
+ const int WSAECONNRESET = 10054;
|
|
|
+ const int WSAETIMEDOUT = 10060;
|
|
|
+
|
|
|
|
|
|
- if (ex.ErrorCode == WSAECONNRESET)
|
|
|
+ if (ex.ErrorCode == WSAECONNRESET || ex.ErrorCode == WSAETIMEDOUT)
|
|
|
{
|
|
|
listenerSocket.BeginAccept(ConnectRequestCallback, listenerSocket);
|
|
|
}
|