Skip to content

Commit 400ac04

Browse files
committed
🐛 Always remove idle response handler after done
1 parent e7a6678 commit 400ac04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/net/imap.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3066,8 +3066,8 @@ def idle(timeout = nil, &response_handler)
30663066
raise @exception || Net::IMAP::Error.new("connection closed")
30673067
end
30683068
ensure
3069+
remove_response_handler(response_handler)
30693070
unless @receiver_thread_terminating
3070-
remove_response_handler(response_handler)
30713071
put_string("DONE#{CRLF}")
30723072
response = get_tagged_response(tag, "IDLE", idle_response_timeout)
30733073
end

0 commit comments

Comments
 (0)