Minor code refactoring

This commit is contained in:
Tal Aloni 2017-03-04 11:05:03 +02:00
parent 07c4ecfd0c
commit 152f2cdaa0

View file

@ -99,7 +99,7 @@ namespace SMBLibrary.Server
// See http://stackoverflow.com/questions/7704417/socket-endaccept-error-10054 // See http://stackoverflow.com/questions/7704417/socket-endaccept-error-10054
if (ex.ErrorCode == WSAECONNRESET) if (ex.ErrorCode == WSAECONNRESET)
{ {
m_listenerSocket.BeginAccept(ConnectRequestCallback, m_listenerSocket); listenerSocket.BeginAccept(ConnectRequestCallback, listenerSocket);
} }
Log(Severity.Debug, "Connection request error {0}", ex.ErrorCode); Log(Severity.Debug, "Connection request error {0}", ex.ErrorCode);
return; return;
@ -123,7 +123,7 @@ namespace SMBLibrary.Server
catch (SocketException) catch (SocketException)
{ {
} }
m_listenerSocket.BeginAccept(ConnectRequestCallback, m_listenerSocket); listenerSocket.BeginAccept(ConnectRequestCallback, listenerSocket);
} }
private void ReceiveCallback(IAsyncResult result) private void ReceiveCallback(IAsyncResult result)