From: Timo Sirainen Date: Fri, 19 Feb 2010 03:30:56 +0000 (+0200) Subject: lib-auth: Make sure reconnection timeout if removed after getting connected. X-Git-Tag: 2.0.beta3~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=366e81c4f5329857fefb4bc7751fb72d5dd28959;p=thirdparty%2Fdovecot%2Fcore.git lib-auth: Make sure reconnection timeout if removed after getting connected. --HG-- branch : HEAD --- diff --git a/src/lib-auth/auth-server-connection.c b/src/lib-auth/auth-server-connection.c index 6b6ec57776..7df9079b1e 100644 --- a/src/lib-auth/auth-server-connection.c +++ b/src/lib-auth/auth-server-connection.c @@ -349,7 +349,6 @@ void auth_server_connection_disconnect(struct auth_server_connection *conn) static void auth_server_reconnect_timeout(struct auth_server_connection *conn) { - timeout_remove(&conn->to); (void)auth_server_connection_connect(conn); } @@ -394,6 +393,8 @@ int auth_server_connection_connect(struct auth_server_connection *conn) i_assert(conn->fd == -1); conn->last_connect = ioloop_time; + if (conn->to != NULL) + timeout_remove(&conn->to); /* max. 1 second wait here. */ fd = net_connect_unix_with_retries(conn->client->auth_socket_path,