From 5653a2be07fca031db22d8ee2d6238cd5de8f88a Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Thu, 29 Aug 2013 08:39:26 -0600 Subject: [PATCH] fix crash when using auth_conn and something times out during login a client can be linked when in CL_LOGIN due to doing the auth query, so be prepared to close the associated server as well. --- src/objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objects.c b/src/objects.c index fe9865a..e20259b 100644 --- a/src/objects.c +++ b/src/objects.c @@ -824,6 +824,7 @@ void disconnect_client(PgSocket *client, bool notify, const char *reason, ...) switch (client->state) { case CL_ACTIVE: + case CL_LOGIN: if (client->link) { PgSocket *server = client->link; /* ->ready may be set before all is sent */ @@ -836,7 +837,6 @@ void disconnect_client(PgSocket *client, bool notify, const char *reason, ...) disconnect_server(server, true, "unclean server"); } } - case CL_LOGIN: case CL_WAITING: case CL_WAITING_LOGIN: case CL_CANCEL: -- 2.40.0