File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -2397,11 +2397,16 @@ def enable(*capabilities)
2397
2397
# checks the connection for each 60 seconds.
2398
2398
#
2399
2399
# loop do
2400
- # imap.idle(60) do |res|
2401
- # ...
2400
+ # imap.idle(60) do |response|
2401
+ # do_something_with(response)
2402
+ # imap.idle_done if some_condition?(response)
2402
2403
# end
2403
2404
# end
2404
2405
#
2406
+ # Returns the server's response to indicate the IDLE state has ended.
2407
+ # Returns +nil+ if the server does not respond to #idle_done within
2408
+ # idle_response_timeout seconds.
2409
+ #
2405
2410
# Related: #idle_done, #noop, #check
2406
2411
#
2407
2412
# ===== Capabilities
@@ -2437,7 +2442,10 @@ def idle(timeout = nil, &response_handler)
2437
2442
return response
2438
2443
end
2439
2444
2440
- # Leaves IDLE.
2445
+ # Leaves IDLE, allowing #idle to return.
2446
+ #
2447
+ # If the server does not respond within idle_response_timeout, #idle will
2448
+ # return +nil+.
2441
2449
#
2442
2450
# Related: #idle
2443
2451
def idle_done
You can’t perform that action at this time.
0 commit comments