]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
trunk: Enable destructor _before_ starting the connection
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 13 Mar 2020 15:47:59 +0000 (11:47 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 13 Mar 2020 15:47:59 +0000 (11:47 -0400)
src/lib/server/trunk.c

index 20b5e48eb5dc4c7b42691092e017ba4c67d0eb89..212644273eae68e36abb957d564132c46f6d8a09 100644 (file)
@@ -2928,10 +2928,10 @@ static int trunk_connection_spawn(fr_trunk_t *trunk, fr_time_t now)
        fr_connection_add_watch_post(tconn->pub.conn, FR_CONNECTION_STATE_HALTED,
                                     _trunk_connection_on_halted, false, tconn);        /* About to be freed */
 
-       fr_connection_signal_init(tconn->pub.conn);     /* annnnd GO! */
-
        talloc_set_destructor(tconn, _trunk_connection_free);
 
+       fr_connection_signal_init(tconn->pub.conn);     /* annnnd GO! */
+
        trunk->pub.last_open = now;
 
        return 0;