Re-work of thread model

This commit is contained in:
Joseph Henry
2019-02-06 22:00:39 -08:00
parent 292fcdda2c
commit 2fdcf025e1
138 changed files with 7567 additions and 15053 deletions

View File

@@ -36,29 +36,3 @@ index 74c22d33..58979e26 100644
if (i < nqcb->oldQueues.size()) {
if (nqcb->oldQueues[i]->byteLength > maxQueueLength) {
maxQueueLength = nqcb->oldQueues[i]->byteLength;
diff --git a/service/OneService.cpp b/service/OneService.cpp
index a1c53764..e3034059 100644
--- a/service/OneService.cpp
+++ b/service/OneService.cpp
@@ -625,6 +625,8 @@ public:
break;
if (!pkt)
break;
+ if (!_run)
+ break;
const ZT_ResultCode rc = _node->processWirePacket(nullptr,pkt->now,pkt->sock,&(pkt->from),pkt->data,pkt->size,&_nextBackgroundTaskDeadline);
{
@@ -2244,6 +2246,12 @@ public:
#endif
syncManagedStuff(n,true,true);
n.tap->setMtu(nwc->mtu);
+#if defined(ZT_SDK)
+ // Inform the virtual tap of the update
+ if (op == ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_CONFIG_UPDATE) {
+ n.tap->lastConfigUpdate(OSUtils::now());
+ }
+#endif
} else {
_nets.erase(nwid);
return -999; // tap init failed