mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
More ripping out of old condition stuff.
This commit is contained in:
parent
dc0f3559be
commit
91fef21973
2 changed files with 6 additions and 6 deletions
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
#include "Node.hpp"
|
#include "Node.hpp"
|
||||||
#include "Topology.hpp"
|
#include "Topology.hpp"
|
||||||
#include "Demarc.hpp"
|
#include "SocketManager.hpp"
|
||||||
#include "Packet.hpp"
|
#include "Packet.hpp"
|
||||||
#include "Switch.hpp"
|
#include "Switch.hpp"
|
||||||
#include "Utils.hpp"
|
#include "Utils.hpp"
|
||||||
|
@ -242,7 +242,7 @@ struct _NodeImpl
|
||||||
delete renv.nc;
|
delete renv.nc;
|
||||||
delete renv.sysEnv;
|
delete renv.sysEnv;
|
||||||
delete renv.topology;
|
delete renv.topology;
|
||||||
delete renv.demarc;
|
delete renv.sm;
|
||||||
delete renv.sw;
|
delete renv.sw;
|
||||||
delete renv.mc;
|
delete renv.mc;
|
||||||
delete renv.prng;
|
delete renv.prng;
|
||||||
|
@ -634,7 +634,7 @@ Node::ReasonForTermination Node::run()
|
||||||
try {
|
try {
|
||||||
unsigned long delay = std::min((unsigned long)ZT_MIN_SERVICE_LOOP_INTERVAL,_r->sw->doTimerTasks());
|
unsigned long delay = std::min((unsigned long)ZT_MIN_SERVICE_LOOP_INTERVAL,_r->sw->doTimerTasks());
|
||||||
uint64_t start = Utils::now();
|
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
|
lastDelayDelta = (long)(Utils::now() - start) - (long)delay; // used to detect sleep/wake
|
||||||
} catch (std::exception &exc) {
|
} catch (std::exception &exc) {
|
||||||
LOG("unexpected exception running Switch doTimerTasks: %s",exc.what());
|
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)->reasonForTermination = reason;
|
||||||
((_NodeImpl *)_impl)->reasonForTerminationStr = ((reasonText) ? reasonText : "");
|
((_NodeImpl *)_impl)->reasonForTerminationStr = ((reasonText) ? reasonText : "");
|
||||||
((_NodeImpl *)_impl)->renv.mainLoopWaitCondition.signal();
|
((_NodeImpl *)_impl)->renv.sw->whack();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Node::resync()
|
void Node::resync()
|
||||||
throw()
|
throw()
|
||||||
{
|
{
|
||||||
((_NodeImpl *)_impl)->resynchronize = true;
|
((_NodeImpl *)_impl)->resynchronize = true;
|
||||||
((_NodeImpl *)_impl)->renv.mainLoopWaitCondition.signal();
|
((_NodeImpl *)_impl)->renv.sw->whack();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _VersionStringMaker
|
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
|
// Kick main loop out of wait so that it can pick up this
|
||||||
// change to our scheduled timer tasks.
|
// change to our scheduled timer tasks.
|
||||||
_r->mainLoopWaitCondition.signal();
|
_r->sm->whack();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long Switch::doTimerTasks()
|
unsigned long Switch::doTimerTasks()
|
||||||
|
|
Loading…
Add table
Reference in a new issue