From cb8e7b4d5e3cb4c5b79ccb9f74c161182222daca Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 15 Dec 2017 10:15:13 -0800 Subject: [PATCH] Make UDP read loop eventually move on. --- osdep/Phy.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osdep/Phy.hpp b/osdep/Phy.hpp index 01a339e9c..f71bd56c5 100644 --- a/osdep/Phy.hpp +++ b/osdep/Phy.hpp @@ -965,7 +965,7 @@ public: case ZT_PHY_SOCKET_UDP: if (FD_ISSET(s->sock,&rfds)) { - for(;;) { + for(int k=0;k<1024;++k) { memset(&ss,0,sizeof(ss)); socklen_t slen = sizeof(ss); long n = (long)::recvfrom(s->sock,buf,sizeof(buf),0,(struct sockaddr *)&ss,&slen);