mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
fixed race condition
This commit is contained in:
parent
10577cd1e5
commit
250af7f247
2
NetDb.h
2
NetDb.h
@ -90,7 +90,7 @@ namespace data
|
||||
|
||||
void Reseed ();
|
||||
|
||||
// for web interface and stats
|
||||
// for web interface
|
||||
int GetNumRouters () const { return m_RouterInfos.size (); };
|
||||
int GetNumFloodfills () const { return m_Floodfills.size (); };
|
||||
int GetNumLeaseSets () const { return m_LeaseSets.size (); };
|
||||
|
@ -235,8 +235,8 @@ namespace stream
|
||||
s->HandleReceiveTimer (boost::asio::error::make_error_code (boost::asio::error::operation_aborted), buffer, handler);
|
||||
else
|
||||
{
|
||||
m_ReceiveTimer.expires_from_now (boost::posix_time::seconds(timeout));
|
||||
m_ReceiveTimer.async_wait ([=](const boost::system::error_code& ecode)
|
||||
s->m_ReceiveTimer.expires_from_now (boost::posix_time::seconds(timeout));
|
||||
s->m_ReceiveTimer.async_wait ([=](const boost::system::error_code& ecode)
|
||||
{ s->HandleReceiveTimer (ecode, buffer, handler); });
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user