]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
fr_bio_fd_unix_shutdown is called after fr_bio_fd_close
authorNick Porter <nick@portercomputing.co.uk>
Mon, 20 Oct 2025 15:34:29 +0000 (16:34 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 20 Oct 2025 15:34:29 +0000 (16:34 +0100)
Which means the bio state is expected to be FR_BIO_FD_STATE_CLOSED

src/lib/bio/fd_open.c

index c62780bd899859500431d58b6408ca9e7f39976e..9ec486794193b9e4f34fe1869db2f5d89c2ced9a 100644 (file)
@@ -491,14 +491,14 @@ static int fr_bio_fd_unix_shutdown(fr_bio_t *bio)
        fr_bio_fd_t *my = talloc_get_type_abort(bio, fr_bio_fd_t);
 
        /*
-        *      The bio must be open in order to shut it down.
+        *      This is called after fr_bio_fd_close() - which marks the bio state as closed
         *
         *      Unix domain sockets are deleted when the bio is closed.
         *
         *      Unix domain sockets are never in the "connecting" state, because connect() always returns
         *      immediately.
         */
-       fr_assert(my->info.state == FR_BIO_FD_STATE_OPEN);
+       fr_assert(my->info.state == FR_BIO_FD_STATE_CLOSED);
 
        /*
         *      Run the user shutdown before we run ours.