diff options
Diffstat (limited to 'lib/App/ImapNotify.pm')
-rw-r--r-- | lib/App/ImapNotify.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/App/ImapNotify.pm b/lib/App/ImapNotify.pm index cd81538..c67c903 100644 --- a/lib/App/ImapNotify.pm +++ b/lib/App/ImapNotify.pm @@ -89,9 +89,10 @@ method loop_reconnect() { Open a connection and wait for NOTIFY notifications. When a NOTIFY notification arrives, show a notification to the user. -This method throws an exception when the connection to the server is lost. If -you want to continue waiting for new notifications, you may call this method -again. Also look at loop_reconnect(). +This method either returns when the server closes the connection or throws an +exception when the connection to the server is lost. If you want to continue +waiting for new notifications, you may call this method again. Also look at +loop_reconnect(). =cut @@ -124,6 +125,7 @@ method loop() { next if $line =~ /\* \d+ RECENT/; next if $line =~ /\* \d+ EXISTS/; next if $line =~ /\* \d+ EXPUNGE/; + last if $line =~ /\* BYE /; confess(sprintf("Got unexpected line: '%s'", $line)); } |