mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-14 13:18:21 +00:00
Fix TRACE bug and new UDP socket code issue.
This commit is contained in:
@ -93,13 +93,11 @@ bool UdpSocket::notifyAvailableForRead(const SharedPtr<Socket> &self,SocketManag
|
||||
{
|
||||
Buffer<ZT_SOCKET_MAX_MESSAGE_LEN> buf;
|
||||
InetAddress from;
|
||||
for(;;) {
|
||||
socklen_t salen = from.saddrSpaceLen();
|
||||
int n = (int)recvfrom(_sock,buf.data(),ZT_SOCKET_MAX_MESSAGE_LEN,0,from.saddr(),&salen);
|
||||
if (n > 0) {
|
||||
buf.setSize((unsigned int)n);
|
||||
sm->handleReceivedPacket(self,from,buf);
|
||||
} else break;
|
||||
socklen_t salen = from.saddrSpaceLen();
|
||||
int n = (int)recvfrom(_sock,buf.data(),ZT_SOCKET_MAX_MESSAGE_LEN,0,from.saddr(),&salen);
|
||||
if (n > 0) {
|
||||
buf.setSize((unsigned int)n);
|
||||
sm->handleReceivedPacket(self,from,buf);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user