From 5c6715a291e0e843b56f0a168191b3d89657d43f Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Fri, 5 May 2017 17:41:11 +0200 Subject: Fix UDP wait() not returning after first received packet --- drivers/unix/packet_peer_udp_posix.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/unix/packet_peer_udp_posix.cpp') diff --git a/drivers/unix/packet_peer_udp_posix.cpp b/drivers/unix/packet_peer_udp_posix.cpp index 5dbccd4b63..74ceb3946a 100644 --- a/drivers/unix/packet_peer_udp_posix.cpp +++ b/drivers/unix/packet_peer_udp_posix.cpp @@ -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? -- cgit v1.2.3