From: Timo Sirainen Date: Mon, 10 Oct 2016 11:20:16 +0000 (+0300) Subject: lib-program-client: Avoid busy-looping while waiting for ostream to have space. X-Git-Tag: 2.2.26~212 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a3217af3ccf62eaee263d72aa0fe6dcf60884e20;p=thirdparty%2Fdovecot%2Fcore.git lib-program-client: Avoid busy-looping while waiting for ostream to have space. --- diff --git a/src/lib-program-client/program-client.c b/src/lib-program-client/program-client.c index 00c48265e1..2f2fc5794f 100644 --- a/src/lib-program-client/program-client.c +++ b/src/lib-program-client/program-client.c @@ -312,6 +312,8 @@ void program_client_program_input(struct program_client *pclient) program_client_fail(pclient, PROGRAM_CLIENT_ERROR_IO); return; } + if (sent == 0) + return; size = (size_t)sent; }