]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth: Make sure reconnection timeout if removed after getting connected.
authorTimo Sirainen <tss@iki.fi>
Fri, 19 Feb 2010 03:30:56 +0000 (05:30 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 19 Feb 2010 03:30:56 +0000 (05:30 +0200)
--HG--
branch : HEAD

src/lib-auth/auth-server-connection.c

index 6b6ec5777629409c5c4a3b85da76d1a6f5fef793..7df9079b1eb359159b417aa07c46284e5611418c 100644 (file)
@@ -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,