info: check for retry after trying to send
authorFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 4 Mar 2016 18:56:57 +0000 (19:56 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 4 Mar 2016 19:22:11 +0000 (20:22 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/info/olsrd_info.c

index be1607b..102d0ba 100644 (file)
@@ -183,6 +183,10 @@ static void write_data(void *fullyWritten) {
       outbuffer.written[i] += result;
     }
 
+    if ((result < 0) && ((errno == EWOULDBLOCK) || (errno == EAGAIN))) {
+      continue;
+    }
+
     if ((result < 0) || (outbuffer.written[i] >= outbuffer.size[i])) {
       /* close this socket and cleanup*/
       close(outbuffer.socket[i]);