diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-06-12 09:38:52 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-06-12 09:38:52 -0700 |
| commit | 817b9d012e2d345b77b12537e3857b575941f9c2 (patch) | |
| tree | 3c00e166df6c2405c260fa2ce651296e59673b28 /node/Switch.cpp | |
| parent | d55c732e1915affd2f40321261bb8178fa28f95a (diff) | |
| parent | dce9cb27c1f464cb4a5111c27502d8ca1d7297de (diff) | |
| download | infinitytier-817b9d012e2d345b77b12537e3857b575941f9c2.tar.gz infinitytier-817b9d012e2d345b77b12537e3857b575941f9c2.zip | |
Merge branch 'dev' of http://10.6.6.2/zerotier/ZeroTierOne into dev
Diffstat (limited to 'node/Switch.cpp')
| -rw-r--r-- | node/Switch.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp index eb1ebadb..3fa8c31d 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -503,6 +503,9 @@ void Switch::send(void *tPtr,Packet &packet,bool encrypt) if (!_trySend(tPtr,packet,encrypt)) { { Mutex::Lock _l(_txQueue_m); + if (_txQueue.size() >= ZT_TX_QUEUE_SIZE) { + _txQueue.pop_front(); + } _txQueue.push_back(TXQueueEntry(dest,RR->node->now(),packet,encrypt)); } if (!RR->topology->getPeer(tPtr,dest)) |
