mirror of
https://github.com/mjl-/mox.git
synced 2025-07-13 23:34:36 +03:00
queue: when shutting down, wait for pending deliveries before signaling that shutdown is complete
also fixes flaky test, which is how i found it
This commit is contained in:
@ -1006,6 +1006,10 @@ func startHookQueue(done chan struct{}) {
|
||||
for {
|
||||
select {
|
||||
case <-mox.Shutdown.Done():
|
||||
for len(busyHookURLs) > 0 {
|
||||
url := <-hookDeliveryResults
|
||||
delete(busyHookURLs, url)
|
||||
}
|
||||
done <- struct{}{}
|
||||
return
|
||||
case <-hookqueue:
|
||||
|
Reference in New Issue
Block a user