diff options
Diffstat (limited to 'lib/net/pop.rb')
-rw-r--r-- | lib/net/pop.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/net/pop.rb b/lib/net/pop.rb index be1eed1297..c015338ced 100644 --- a/lib/net/pop.rb +++ b/lib/net/pop.rb @@ -542,7 +542,9 @@ module Net # internal method for Net::POP3.start def do_start(account, password) # :nodoc: - s = timeout(@open_timeout) { TCPSocket.open(@address, port) } + s = Timeout.timeout(@open_timeout, Net::OpenTimeout) do + TCPSocket.open(@address, port) + end if use_ssl? raise 'openssl library not installed' unless defined?(OpenSSL) context = OpenSSL::SSL::SSLContext.new |