]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
scheduler: Fix regression in background thread (Issue #934) 937/head
authorAndreas Karlson <a.karlson2608@hotmail.com>
Wed, 10 Apr 2024 12:44:22 +0000 (14:44 +0200)
committerAndreas Karlson <a.karlson2608@hotmail.com>
Wed, 10 Apr 2024 13:22:40 +0000 (15:22 +0200)
The con->bg_pending value is used to indicate that the background thread
has finished running and that the connection can be safely closed.

This commit makes the con->bg_pending = 0 only after the connection
can be safely closed.

scheduler/ipp.c

index 7a8148411c69db25386479dba05a615fa99e21ed..37623c54ecca5dff2eeeaae703a49985830a51b8 100644 (file)
@@ -5517,10 +5517,10 @@ create_local_bg_thread(
 
   ippDelete(response);
 
-  con->bg_pending = 0;
-
   send_response(con);
 
+  con->bg_pending = 0;
+
   return (NULL);
 }