Skip to content

Commit 8e4e87b

Browse files
Ignore all exceptions when closing socket frame handler
1 parent d794a48 commit 8e4e87b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

projects/client/RabbitMQ.Client/src/client/impl/SocketFrameHandler.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,16 @@ public void Close()
164164
try
165165
{
166166
m_socket.LingerState = new LingerOption(true, SOCKET_CLOSING_TIMEOUT);
167+
m_socket.Close();
167168
}
168-
catch (ArgumentException _)
169+
catch (Exception _)
169170
{
170171
// ignore, we are closing anyway
171172
}
172-
m_socket.Close();
173-
_closed = true;
173+
finally
174+
{
175+
_closed = true;
176+
}
174177
}
175178
}
176179
}

0 commit comments

Comments
 (0)