Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,16 @@ public void WriteFrame(Frame frame)

public void Close()
{
m_socket.LingerState = new LingerOption(true, SOCKET_CLOSING_TIMEOUT);
m_socket.Close();
try
{
m_socket.LingerState = new LingerOption(true, SOCKET_CLOSING_TIMEOUT);
m_socket.Close();
}
catch (ObjectDisposedException)
{
// Ignore the exception if the socket is already closed/disposed
return;
}
}
}
}