Skip to content

Commit

Permalink
🚧 WIP: Deprecate timeout accessors
Browse files Browse the repository at this point in the history
These can be reached through `config`, and there's no reason (besides
backward compatibility) to give them special priority over most other
config options.
  • Loading branch information
nevans committed Nov 8, 2024
1 parent ea47e34 commit d4d1fee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/net/imap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -773,11 +773,18 @@ class << self
# Net::IMAP.config.
attr_reader :config

# >>>
# *DEPRECATED:* Use {config.open_timeout}[rdoc-ref:Config#open_timeout].
#
# Seconds to wait until a connection is opened.
# If the IMAP object cannot open a connection within this time,
# it raises a Net::OpenTimeout exception. The default value is 30 seconds.
def open_timeout; config.open_timeout end

# >>>
# *DEPRECATED:* Use
# {config.idle_response_timeout}[rdoc-ref:Config#idle_response_timeout].
#
# Seconds to wait until an IDLE response is received.
def idle_response_timeout; config.idle_response_timeout end

Expand Down

0 comments on commit d4d1fee

Please sign in to comment.