Browse code

Restart recv call if EINTR is hit

Shawn Webb authored on 2014/04/03 00:49:09
Showing 1 changed files
... ...
@@ -240,7 +240,7 @@ nonblock_recv (int sock, void *buf, size_t len, int flags, int secs)
240 240
         {
241 241
             recvd = recv(sock, buf, len, flags);
242 242
             if (recvd < 0) {
243
-                if (errno == EAGAIN)
243
+                if (errno == EINTR)
244 244
                     continue;
245 245
 
246 246
                 return -1;