]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-ssl-iostream: iostream-openssl - Return immediately from openssl_iostream_bio_out...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 29 Sep 2021 22:17:47 +0000 (00:17 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 30 Sep 2021 17:08:11 +0000 (17:08 +0000)
src/lib-ssl-iostream/iostream-openssl.c

index b3a426f8a483908473a03eb42873bdd04b417986..156cb7e40122089c11b2501411864ab653e769c0 100644 (file)
@@ -424,8 +424,8 @@ static int openssl_iostream_bio_output_real(struct ssl_iostream *ssl_io)
                   fully succeed or completely fail due to some error. */
                sent = o_stream_send(ssl_io->plain_output, buffer, bytes);
                if (sent < 0) {
-                       result = -1;
-                       break;
+                       o_stream_uncork(ssl_io->plain_output);
+                       return -1;
                }
                i_assert(sent == (ssize_t)bytes);
                result = 1;