Fix UDP wait() not returning after first received packet

(cherry picked from commit 5c6715a291)
This commit is contained in:
Fabio Alessandrelli 2017-05-05 17:41:11 +02:00
parent bd26eacc59
commit e9a7eeaf9c
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) {