Skip to content

Commit 4b2f4f1

Browse files
committed
imapclient: stop IdleCommand.run when connection is closed
1 parent 997ac77 commit 4b2f4f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

imapclient/idle.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ func (cmd *IdleCommand) run(c *Client, child *idleCommand) {
7272
if child, cmd.err = c.idle(); cmd.err != nil {
7373
return
7474
}
75+
case <-c.decCh:
76+
cmd.lastChild = child
77+
return
7578
case <-cmd.stop:
7679
cmd.lastChild = child
7780
return

0 commit comments

Comments
 (0)