From: Timo Sirainen Date: Wed, 4 Sep 2019 14:13:15 +0000 (+0300) Subject: lib-auth: Fix auth_client_is_connected() to work after disconnection X-Git-Tag: 2.3.8~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f506663a3e72061e4a97a94082c3fd775737469a;p=thirdparty%2Fdovecot%2Fcore.git lib-auth: Fix auth_client_is_connected() to work after disconnection --- diff --git a/src/lib-auth/auth-client.c b/src/lib-auth/auth-client.c index 4642aca8b6..4f49f85501 100644 --- a/src/lib-auth/auth-client.c +++ b/src/lib-auth/auth-client.c @@ -56,7 +56,9 @@ void auth_client_disconnect(struct auth_client *client, const char *reason) bool auth_client_is_connected(struct auth_client *client) { - return client->conn->conn.handshake_received; + /* handshake_received isn't unset immediately after disconnection */ + return client->conn->conn.handshake_received && + client->conn->connected; } bool auth_client_is_disconnected(struct auth_client *client)