From: Arran Cudbard-Bell Date: Wed, 25 Mar 2020 14:37:59 +0000 (-0600) Subject: trunk: Signalling an inactive-draining connection to be active, should move it to... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=291e888d76ec9819616d7bd88c6218cbd60aefca;p=thirdparty%2Ffreeradius-server.git trunk: Signalling an inactive-draining connection to be active, should move it to draining, not active --- diff --git a/src/lib/server/trunk.c b/src/lib/server/trunk.c index b510e4980a0..7a07b332102 100644 --- a/src/lib/server/trunk.c +++ b/src/lib/server/trunk.c @@ -2400,6 +2400,7 @@ static void trunk_connection_enter_inactive_draining(fr_trunk_connection_t *tcon switch (tconn->pub.state) { case FR_TRUNK_CONN_INACTIVE: + case FR_TRUNK_CONN_DRAINING: trunk_connection_remove(tconn); break; @@ -3146,7 +3147,6 @@ void fr_trunk_connection_signal_active(fr_trunk_connection_t *tconn) break; case FR_TRUNK_CONN_INACTIVE: - case FR_TRUNK_CONN_INACTIVE_DRAINING: /* Only an external signal can trigger this transition */ /* * Do the appropriate state transition based on * how many requests the trunk connection is @@ -3159,6 +3159,15 @@ void fr_trunk_connection_signal_active(fr_trunk_connection_t *tconn) trunk_connection_enter_active(tconn); break; + /* + * Unsetting the active flag just moves + * the connection back to the normal + * draining state. + */ + case FR_TRUNK_CONN_INACTIVE_DRAINING: /* Only an external signal can trigger this transition */ + trunk_connection_enter_draining(tconn); + break; + default: return; }