mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 12:24:19 +00:00
fixed race condition
This commit is contained in:
parent
3de4010a47
commit
a0a0234d29
3
SAM.cpp
3
SAM.cpp
@ -59,6 +59,7 @@ namespace stream
|
||||
default:
|
||||
;
|
||||
}
|
||||
m_Socket.close ();
|
||||
delete this;
|
||||
}
|
||||
|
||||
@ -447,7 +448,7 @@ namespace stream
|
||||
{
|
||||
LogPrint ("SAM stream read error: ", ecode.message ());
|
||||
if (ecode != boost::asio::error::operation_aborted)
|
||||
Terminate ();
|
||||
m_Socket.get_io_service ().post (boost::bind (&SAMSocket::Terminate, this));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
2
SAM.h
2
SAM.h
@ -21,7 +21,7 @@ namespace stream
|
||||
const int SAM_CONNECT_TIMEOUT = 5; // in seconds
|
||||
const int SAM_NAMING_LOOKUP_TIMEOUT = 5; // in seconds
|
||||
const char SAM_HANDSHAKE[] = "HELLO VERSION";
|
||||
const char SAM_HANDSHAKE_REPLY[] = "HELLO REPLY RESULT=OK VERSION=3.1\n";
|
||||
const char SAM_HANDSHAKE_REPLY[] = "HELLO REPLY RESULT=OK VERSION=3.0\n";
|
||||
const char SAM_SESSION_CREATE[] = "SESSION CREATE";
|
||||
const char SAM_SESSION_CREATE_REPLY_OK[] = "SESSION STATUS RESULT=OK DESTINATION=%s\n";
|
||||
const char SAM_SESSION_CREATE_DUPLICATED_ID[] = "SESSION STATUS RESULT=DUPLICATED_ID\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user