mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-31 04:44:13 +00:00
fixed race condition
This commit is contained in:
parent
7b537a4e94
commit
b347b719f3
@ -692,8 +692,9 @@ namespace client
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::asio::async_write (m_Socket, boost::asio::buffer (m_StreamBuffer, bytes_transferred),
|
||||
std::bind (&SAMSocket::HandleWriteI2PData, shared_from_this (), std::placeholders::_1));
|
||||
if (m_SocketType != eSAMSocketTypeTerminated) // check for possible race condition with Terminate()
|
||||
boost::asio::async_write (m_Socket, boost::asio::buffer (m_StreamBuffer, bytes_transferred),
|
||||
std::bind (&SAMSocket::HandleWriteI2PData, shared_from_this (), std::placeholders::_1));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user