changeset 21780:e54c9d8d9936

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.
author Stephan Bosch <stephan.bosch@dovecot.fi>
date Thu, 02 Mar 2017 00:42:13 +0100
parents 2cfa5218955e
children cc0c9ccd3113
files src/lib-smtp/lmtp-client.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-smtp/lmtp-client.c	Thu Mar 02 00:03:50 2017 +0100
+++ b/src/lib-smtp/lmtp-client.c	Thu Mar 02 00:42:13 2017 +0100
@@ -634,7 +634,7 @@
 				 " (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);