summaryrefslogtreecommitdiff
path: root/blktrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'blktrace.c')
-rw-r--r--blktrace.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/blktrace.c b/blktrace.c
index 6469586..26b3afd 100644
--- a/blktrace.c
+++ b/blktrace.c
@@ -799,8 +799,11 @@ static int __net_recv_data(int fd, void *buf, unsigned int len)
if (ret == 0)
break;
else if (ret < 0) {
- if (errno != EAGAIN)
- perror("server: net_recv_data: recv failed");
+ if (errno == EAGAIN) {
+ usleep(50);
+ continue;
+ }
+ perror("server: net_recv_data: recv failed");
break;
} else {
buf += ret;