Fix return value on timeout
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Sat, 30 Jan 2016 07:02:50 +0000 (09:02 +0200)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Sat, 30 Jan 2016 07:02:50 +0000 (09:02 +0200)
ethsock.c

index 40d992c008c27bebf021aa6d205ce88160a94be7..5b05bc732e6292d6e689af004908bcd612479587 100644 (file)
--- a/ethsock.c
+++ b/ethsock.c
@@ -143,7 +143,7 @@ ssize_t ethsock_recv(struct ethsock *sock, void *buf, size_t len)
                        perror("select");
                        return -1;
                } else if (status == 0) {
-                       return 1;
+                       return 0;
                }
        }