mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-19 15:43:53 +00:00
More TCP-related fixes and tweaks to ping timing, resynchronize, and startup.
This commit is contained in:
@ -73,7 +73,7 @@ bool TcpSocket::send(const InetAddress &to,const void *msg,unsigned int msglen)
|
||||
|
||||
Mutex::Lock _l(_writeLock);
|
||||
|
||||
bool outputWasEnqueued = (_outptr != 0);
|
||||
bool writeInProgress = ((_outptr != 0)||(_connecting));
|
||||
|
||||
// Ensure that _outbuf is large enough
|
||||
unsigned int newptr = _outptr + 5 + msglen;
|
||||
@ -102,7 +102,7 @@ bool TcpSocket::send(const InetAddress &to,const void *msg,unsigned int msglen)
|
||||
for(unsigned int i=0;i<msglen;++i)
|
||||
_outbuf[_outptr++] = ((const unsigned char *)msg)[i];
|
||||
|
||||
if (!outputWasEnqueued) {
|
||||
if (!writeInProgress) {
|
||||
// If no output was enqueued before this, try to send() it and then
|
||||
// start a queued write if any remains after that.
|
||||
|
||||
|
Reference in New Issue
Block a user