Commit e69809e
committed
mod_smtp_delivery_external: Abort cleanly if unloaded while busy.
If the queue_handler thread is in the middle of attempting to deliver
a message when an unload is requested, the current operation will be
interrupted and fail with EINTR. This was intended to interrupt
bbs_safe_sleep_interrupt and cause it to abort the loop. However, the
delivery operation would get interrupted and we would simply continue
on to calling bbs_safe_sleep_interrupt, and because this is after the
thread was interrupted, we would not exit as we are supposed. Check
if an unload is in progress after any queue delivery attempts and prior
to calling bbs_safe_sleep_interrupt again, so that we unload regardless
of what the thread is doing when interrupted.
LBBS-144 #close1 parent f9c9a95 commit e69809e
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1656 | 1656 | | |
1657 | 1657 | | |
1658 | 1658 | | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
1659 | 1663 | | |
1660 | 1664 | | |
1661 | 1665 | | |
| |||
0 commit comments