Browse Source

fixed race condition

pull/177/head
orignal 10 years ago
parent
commit
250af7f247
  1. 2
      NetDb.h
  2. 4
      Streaming.h

2
NetDb.h

@ -90,7 +90,7 @@ namespace data
void Reseed (); void Reseed ();
// for web interface and stats // for web interface
int GetNumRouters () const { return m_RouterInfos.size (); }; int GetNumRouters () const { return m_RouterInfos.size (); };
int GetNumFloodfills () const { return m_Floodfills.size (); }; int GetNumFloodfills () const { return m_Floodfills.size (); };
int GetNumLeaseSets () const { return m_LeaseSets.size (); }; int GetNumLeaseSets () const { return m_LeaseSets.size (); };

4
Streaming.h

@ -235,8 +235,8 @@ namespace stream
s->HandleReceiveTimer (boost::asio::error::make_error_code (boost::asio::error::operation_aborted), buffer, handler); s->HandleReceiveTimer (boost::asio::error::make_error_code (boost::asio::error::operation_aborted), buffer, handler);
else else
{ {
m_ReceiveTimer.expires_from_now (boost::posix_time::seconds(timeout)); s->m_ReceiveTimer.expires_from_now (boost::posix_time::seconds(timeout));
m_ReceiveTimer.async_wait ([=](const boost::system::error_code& ecode) s->m_ReceiveTimer.async_wait ([=](const boost::system::error_code& ecode)
{ s->HandleReceiveTimer (ecode, buffer, handler); }); { s->HandleReceiveTimer (ecode, buffer, handler); });
} }
}); });

Loading…
Cancel
Save