]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-ssl-iostream: When plain_output's buffer is full, set it flush-pending.
authorTimo Sirainen <tss@iki.fi>
Wed, 7 Sep 2011 08:02:55 +0000 (11:02 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 7 Sep 2011 08:02:55 +0000 (11:02 +0300)
This fixes hangs when the output buffer got full.

src/lib-ssl-iostream/iostream-openssl.c

index 81e5f26d3546ae4cbad6613bb6a62e1d50d6fe47..cfd56a33d34cd029396802c29b3c790a52e2dc6a 100644 (file)
@@ -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;