Skip to content

Commit

Permalink
Rename m_timerSemaphore into m_timerReset
Browse files Browse the repository at this point in the history
  • Loading branch information
pirapira committed Nov 27, 2017
1 parent 463fb8d commit c34498b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libp2p/Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void Host::stop()
{
unique_lock<mutex> l(x_runTimer);
while (m_timer)
m_timerSemaphore.wait(l);
m_timerReset.wait(l);
}

// stop worker thread
Expand Down Expand Up @@ -661,7 +661,7 @@ void Host::run(boost::system::error_code const&)
DEV_GUARDED(x_runTimer)
m_timer.reset();

m_timerSemaphore.notify_all();
m_timerReset.notify_all();
return;
}

Expand Down
2 changes: 1 addition & 1 deletion libp2p/Host.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ class Host: public Worker
std::unique_ptr<boost::asio::deadline_timer> m_timer; ///< Timer which, when network is running, calls scheduler() every c_timerInterval ms.
mutable std::mutex x_runTimer; ///< Start/stop mutex.
static const unsigned c_timerInterval = 100; ///< Interval which m_timer is run when network is connected.
std::condition_variable m_timerSemaphore;
std::condition_variable m_timerReset;

std::set<Peer*> m_pendingPeerConns; /// Used only by connect(Peer&) to limit concurrently connecting to same node. See connect(shared_ptr<Peer>const&).
Mutex x_pendingNodeConns;
Expand Down

0 comments on commit c34498b

Please sign in to comment.