Fix UDP wait() not returning after first received packet

This commit is contained in:
Fabio Alessandrelli 2017-05-05 17:41:11 +02:00
parent 6034eae95e
commit 5c6715a291
2 changed files with 4 additions and 0 deletions

View File

@ -216,6 +216,8 @@ Error PacketPeerUDPPosix::_poll(bool p_wait) {
len = sizeof(struct sockaddr_storage);
++queue_count;
if (p_wait)
break;
};
// TODO: Should ECONNRESET be handled here?

View File

@ -203,6 +203,8 @@ Error PacketPeerUDPWinsock::_poll(bool p_wait) {
len = sizeof(struct sockaddr_storage);
++queue_count;
if (p_wait)
break;
};
if (ret == SOCKET_ERROR) {