From: Timo Sirainen Date: Wed, 7 Sep 2011 08:02:55 +0000 (+0300) Subject: lib-ssl-iostream: When plain_output's buffer is full, set it flush-pending. X-Git-Tag: 2.1.alpha2~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e21a2c0821c559080550ead6a901f613e59af10e;p=thirdparty%2Fdovecot%2Fcore.git lib-ssl-iostream: When plain_output's buffer is full, set it flush-pending. This fixes hangs when the output buffer got full. --- diff --git a/src/lib-ssl-iostream/iostream-openssl.c b/src/lib-ssl-iostream/iostream-openssl.c index 81e5f26d35..cfd56a33d3 100644 --- a/src/lib-ssl-iostream/iostream-openssl.c +++ b/src/lib-ssl-iostream/iostream-openssl.c @@ -268,6 +268,8 @@ static bool ssl_iostream_bio_output(struct ssl_iostream *ssl_io) if (bytes > max_bytes) { if (max_bytes == 0) { /* wait until output buffer clears */ + o_stream_set_flush_pending(ssl_io->plain_output, + TRUE); break; } bytes = max_bytes;