Index: openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl,v diff -u -N -r1.108.2.25 -r1.108.2.26 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 14 Mar 2022 13:44:04 -0000 1.108.2.25 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 16 Mar 2022 14:36:24 -0000 1.108.2.26 @@ -383,8 +383,7 @@ Send messages in the acs_mail_lite_queue table. } { # Make sure that only one thread is processing the queue at a time. - if {[nsv_incr acs_mail_lite send_mails_p] > 1} { - nsv_incr acs_mail_lite send_mails_p -1 + if {[nsv_incr acs_mail_lite send_mails_p] != 1} { return } @@ -427,7 +426,7 @@ } } } finally { - nsv_incr acs_mail_lite send_mails_p -1 + nsv_unset acs_mail_lite send_mails_p } }