fixed race condition

This commit is contained in:
orignal 2015-02-06 20:53:48 -05:00
parent 8305fd5f82
commit 5730b15f01
7 changed files with 34 additions and 18 deletions

View file

@ -759,9 +759,10 @@ namespace transport
transports.PeerDisconnected (shared_from_this ());
}
void SSUSession::Terminate ()
void SSUSession::Done ()
{
m_Server.DeleteSession (shared_from_this ());
boost::asio::io_service& service = IsV6 () ? m_Server.GetServiceV6 () : m_Server.GetService ();
service.post (std::bind (&SSUSession::Failed, shared_from_this ()));
}
void SSUSession::Established ()