From: Stephan Bosch Date: Wed, 1 Mar 2017 23:42:13 +0000 (+0100) Subject: lib-smtp: lmtp-client: Fixed bug in timeout handling. X-Git-Tag: 2.3.0.rc1~1972 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e422d45a7853cb4ae08020df1526b00ba8e6119c;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: lmtp-client: Fixed bug in timeout handling. The timeout was erroneously stopped when lmtp_client_send() was invoked before a connection was established. Once the connection finally got established, the timeout was removed. This would cause the client to wait indefinitely. --- diff --git a/src/lib-smtp/lmtp-client.c b/src/lib-smtp/lmtp-client.c index deb8b24324..ed8d542dfc 100644 --- a/src/lib-smtp/lmtp-client.c +++ b/src/lib-smtp/lmtp-client.c @@ -633,7 +633,7 @@ static void lmtp_client_wait_connect(struct lmtp_client *client) " (connect)"); return; } - if (client->to != NULL) + if (client->data_input == NULL && client->to != NULL) timeout_remove(&client->to); io_remove(&client->io); client->io = io_add(client->fd, IO_READ, lmtp_client_input, client);