Commit f8e39351 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(main): Actually retry after a EAGAIN, EWOULDBLOCK or EINTR result

	from the final write.  Retry if it succeeds as well -- the
	server may just be slow closing the socket.
parent 585d37fd
......@@ -581,7 +581,7 @@ main(int argc,
{
again = 1;
sleep(1);
break;
continue;
}
/* We expect EPIPE or ECONNRESET. */
......@@ -592,7 +592,15 @@ main(int argc,
fprintf(stderr, "final write returned 0\n");
if (rv > 0)
{
if (retry > 1)
{
again = 1;
sleep(1);
continue;
}
fprintf(stderr, "ERROR: final write succeeded: %d\n", (int)rv);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment