Index: openacs-4/packages/acs-mail/tcl/acs-mail-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/tcl/acs-mail-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-mail/tcl/acs-mail-procs.tcl 3 Oct 2003 12:31:28 -0000 1.9 +++ openacs-4/packages/acs-mail/tcl/acs-mail-procs.tcl 4 Jun 2006 00:45:40 -0000 1.10 @@ -399,6 +399,12 @@ } { Process the outgoing message queue. } { + # Make sure that only one thread is processing the queue at a time. + if {[nsv_incr acs_mail process_queue_p] > 1} { + nsv_incr acs_mail process_queue_p -1 + return + } + db_foreach acs_message_send { select message_id, envelope_from, envelope_to from acs_mail_queue_outgoing