SMBServer: Bugfix: Connection resources were not released after send error in some cases

This commit is contained in:
Tal Aloni 2017-09-03 16:09:33 +03:00
parent 3674fcd58a
commit a390bb1a0c

View file

@ -358,11 +358,13 @@ namespace SMBLibrary.Server
catch (SocketException ex) catch (SocketException ex)
{ {
state.LogToServer(Severity.Debug, "Failed to send packet. SocketException: {0}", ex.Message); state.LogToServer(Severity.Debug, "Failed to send packet. SocketException: {0}", ex.Message);
m_connectionManager.ReleaseConnection(state);
return; return;
} }
catch (ObjectDisposedException) catch (ObjectDisposedException)
{ {
state.LogToServer(Severity.Debug, "Failed to send packet. ObjectDisposedException."); state.LogToServer(Severity.Debug, "Failed to send packet. ObjectDisposedException.");
m_connectionManager.ReleaseConnection(state);
return; return;
} }
} }