@@ -778,7 +778,7 @@ class << self
778
778
def open_timeout ; config . open_timeout end
779
779
780
780
# Seconds to wait until an IDLE response is received.
781
- attr_reader : idle_response_timeout
781
+ def idle_response_timeout ; config . idle_response_timeout end
782
782
783
783
# The hostname this client connected to
784
784
attr_reader :host
@@ -825,14 +825,13 @@ def open_timeout; config.open_timeout end
825
825
# config object for inheritance. Every Net::IMAP client has its own
826
826
# unique #config for overrides.
827
827
#
828
- # [idle_response_timeout]
829
- # Seconds to wait until an IDLE response is received
830
- #
831
828
# Any other keyword arguments will be forwarded to Config.new, to create the
832
829
# client's #config. For example:
833
830
#
834
831
# [open_timeout]
835
832
# Seconds to wait until a connection is opened
833
+ # [idle_response_timeout]
834
+ # Seconds to wait until an IDLE response is received
836
835
#
837
836
# See DeprecatedClientOptions.new for deprecated arguments.
838
837
#
@@ -890,14 +889,12 @@ def open_timeout; config.open_timeout end
890
889
# Connected to the host successfully, but it immediately said goodbye.
891
890
#
892
891
def initialize ( host , port : nil , ssl : nil ,
893
- idle_response_timeout : 5 ,
894
892
config : Config . global , **config_options )
895
893
super ( )
896
894
# Config options
897
895
@host = host
898
896
@config = Config . new ( config , **config_options )
899
897
@port = port || ( ssl ? SSL_PORT : PORT )
900
- @idle_response_timeout = Integer ( idle_response_timeout )
901
898
@ssl_ctx_params , @ssl_ctx = build_ssl_ctx ( ssl )
902
899
903
900
# Basic Client State
@@ -2453,7 +2450,7 @@ def idle(timeout = nil, &response_handler)
2453
2450
unless @receiver_thread_terminating
2454
2451
remove_response_handler ( response_handler )
2455
2452
put_string ( "DONE#{ CRLF } " )
2456
- response = get_tagged_response ( tag , "IDLE" , @ idle_response_timeout)
2453
+ response = get_tagged_response ( tag , "IDLE" , idle_response_timeout )
2457
2454
end
2458
2455
end
2459
2456
end
0 commit comments