summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.c b/main.c
index b4005e17..c5c06875 100644
--- a/main.c
+++ b/main.c
@@ -405,6 +405,10 @@ read_entire_message (int sockfd, int *size) {
int rd = recv(sockfd, buf + rdp, bufsize - rdp, 0);
if (rd < 0) {
+ if (errno == EAGAIN) {
+ usleep (50000);
+ continue;
+ }
free(buf);
return NULL;
}