mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-07 11:17:29 +00:00
More ripping out of old condition stuff.
This commit is contained in:
parent
dc0f3559be
commit
91fef21973
@ -56,7 +56,7 @@
|
||||
|
||||
#include "Node.hpp"
|
||||
#include "Topology.hpp"
|
||||
#include "Demarc.hpp"
|
||||
#include "SocketManager.hpp"
|
||||
#include "Packet.hpp"
|
||||
#include "Switch.hpp"
|
||||
#include "Utils.hpp"
|
||||
@ -242,7 +242,7 @@ struct _NodeImpl
|
||||
delete renv.nc;
|
||||
delete renv.sysEnv;
|
||||
delete renv.topology;
|
||||
delete renv.demarc;
|
||||
delete renv.sm;
|
||||
delete renv.sw;
|
||||
delete renv.mc;
|
||||
delete renv.prng;
|
||||
@ -634,7 +634,7 @@ Node::ReasonForTermination Node::run()
|
||||
try {
|
||||
unsigned long delay = std::min((unsigned long)ZT_MIN_SERVICE_LOOP_INTERVAL,_r->sw->doTimerTasks());
|
||||
uint64_t start = Utils::now();
|
||||
_r->mainLoopWaitCondition.wait(delay);
|
||||
_r->sm->poll(delay);
|
||||
lastDelayDelta = (long)(Utils::now() - start) - (long)delay; // used to detect sleep/wake
|
||||
} catch (std::exception &exc) {
|
||||
LOG("unexpected exception running Switch doTimerTasks: %s",exc.what());
|
||||
@ -663,14 +663,14 @@ void Node::terminate(ReasonForTermination reason,const char *reasonText)
|
||||
{
|
||||
((_NodeImpl *)_impl)->reasonForTermination = reason;
|
||||
((_NodeImpl *)_impl)->reasonForTerminationStr = ((reasonText) ? reasonText : "");
|
||||
((_NodeImpl *)_impl)->renv.mainLoopWaitCondition.signal();
|
||||
((_NodeImpl *)_impl)->renv.sw->whack();
|
||||
}
|
||||
|
||||
void Node::resync()
|
||||
throw()
|
||||
{
|
||||
((_NodeImpl *)_impl)->resynchronize = true;
|
||||
((_NodeImpl *)_impl)->renv.mainLoopWaitCondition.signal();
|
||||
((_NodeImpl *)_impl)->renv.sw->whack();
|
||||
}
|
||||
|
||||
class _VersionStringMaker
|
||||
|
@ -321,7 +321,7 @@ void Switch::contact(const SharedPtr<Peer> &peer,const InetAddress &atAddr)
|
||||
|
||||
// Kick main loop out of wait so that it can pick up this
|
||||
// change to our scheduled timer tasks.
|
||||
_r->mainLoopWaitCondition.signal();
|
||||
_r->sm->whack();
|
||||
}
|
||||
|
||||
unsigned long Switch::doTimerTasks()
|
||||
|
Loading…
x
Reference in New Issue
Block a user