From 366e81c4f5329857fefb4bc7751fb72d5dd28959 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 19 Feb 2010 05:30:56 +0200 Subject: [PATCH] lib-auth: Make sure reconnection timeout if removed after getting connected. --HG-- branch : HEAD --- src/lib-auth/auth-server-connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, -- 2.47.3