From: Jens Axboe Date: Thu, 29 Nov 2012 18:57:35 +0000 (+0100) Subject: net: exit on WAITALL and !ret X-Git-Tag: fio-2.0.12~43 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=7d988f68c7f0ff6bd4c9e558c4defbd9a544b167;ds=inline net: exit on WAITALL and !ret Otherwise we can loop forever if the other end hung up. Signed-off-by: Jens Axboe --- diff --git a/engines/net.c b/engines/net.c index 101f7540..419508e4 100644 --- a/engines/net.c +++ b/engines/net.c @@ -360,6 +360,8 @@ static int fio_netio_recv(struct thread_data *td, struct io_u *io_u) } if (ret > 0) break; + else if (!ret && (flags & MSG_WAITALL)) + break; ret = poll_wait(td, io_u->file->fd, POLLIN); if (ret <= 0)