From: Arran Cudbard-Bell Date: Wed, 25 Mar 2020 14:45:31 +0000 (-0600) Subject: connection: Fix issue where closed was entered when it shouldn't have been on halt X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07df19ea138df9f520ce5aa64005d0203352168d;p=thirdparty%2Ffreeradius-server.git connection: Fix issue where closed was entered when it shouldn't have been on halt --- diff --git a/src/lib/server/connection.c b/src/lib/server/connection.c index 19b7216da22..f5069c3f9ce 100644 --- a/src/lib/server/connection.c +++ b/src/lib/server/connection.c @@ -1153,17 +1153,20 @@ void fr_connection_signal_halt(fr_connection_t *conn) break; case FR_CONNECTION_STATE_INIT: - case FR_CONNECTION_STATE_SHUTDOWN: - case FR_CONNECTION_STATE_TIMEOUT: case FR_CONNECTION_STATE_CLOSED: connection_state_enter_halted(conn); break; + /* + * If the connection is any of these states it + * must have completed INIT which means it has + * an active handle which needs to be closed before + * the connection is halted. + */ case FR_CONNECTION_STATE_CONNECTED: case FR_CONNECTION_STATE_CONNECTING: - connection_state_closed_enter(conn); - - /* FALL-THROUGH */ + case FR_CONNECTION_STATE_SHUTDOWN: + case FR_CONNECTION_STATE_TIMEOUT: case FR_CONNECTION_STATE_FAILED: rad_assert(conn->is_closed); connection_state_enter_halted(conn);