about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-10-21 21:10:25 +0000
committerEric Wong <e@80x24.org>2021-10-22 00:54:43 +0000
commit8c9e20805d1e2a9245ae35ed6c5b737731513be8 (patch)
treeec146d1ecbd1d5b2cfa0bf8b29dbd8229324b2f1
parentae9ff54615286fbc88ffaa713a3b884294a8066b (diff)
downloadpublic-inbox-8c9e20805d1e2a9245ae35ed6c5b737731513be8.tar.gz
This may make it less likely for watch-dependent tests to get
stuck.  Unfortunately, due to the synchronous API of
Mail::IMAPClient, ->idle is still susceptible to missing
signals.
-rw-r--r--lib/PublicInbox/Watch.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/Watch.pm b/lib/PublicInbox/Watch.pm
index b48d9ccc..e80bbdec 100644
--- a/lib/PublicInbox/Watch.pm
+++ b/lib/PublicInbox/Watch.pm
@@ -330,6 +330,7 @@ sub imap_idle_once ($$$$) {
         my $end = now() + $intvl;
         warn "I: $uri idling for ${intvl}s\n";
         local $0 = "IDLE $0";
+        return if $self->{quit};
         unless ($mic->idle) {
                 return if $self->{quit};
                 return "E: IDLE failed on $uri: $!";