Fixed nasty cleanup crash on Windows.

This commit is contained in:
lotodore
2009-03-21 10:28:27 +00:00
parent 4a8f1e7692
commit ebac9c9574
6 changed files with 59 additions and 39 deletions
+7 -1
View File
@@ -32,7 +32,13 @@ SessionData::SessionData(SOCKET sockfd, SessionId id, boost::shared_ptr<SenderIn
SessionData::~SessionData()
{
m_callback.SignalSessionTerminated(m_id);
m_socket->cancel();
// We are shutting down, so ignore any error.
try
{
m_socket->cancel();
} catch(...)
{
}
}
SessionId