diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-26 08:22:35 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-26 08:22:35 +0000 |
commit | c7855be25c379206a1bddd2bbd76e11cc642c8f8 (patch) | |
tree | 6f796db192b56d7cc5da35acac6280bf97388947 /lib/net | |
parent | d3236ba3b4652eb9e66474b4fe6642a1d2884cbf (diff) | |
download | ruby-c7855be25c379206a1bddd2bbd76e11cc642c8f8.tar.gz |
use clock_gettime to avoid object creation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/http.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index b5706c597f..957cb358b2 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -915,7 +915,7 @@ module Net #:nodoc: HTTPResponse.read_new(@socket).value end if @ssl_session and - Time.now < @ssl_session.time + @ssl_session.timeout + Process.clock_gettime(Process::CLOCK_REALTIME) < @ssl_session.time.to_f + @ssl_session.timeout s.session = @ssl_session if @ssl_session end # Server Name Indication (SNI) RFC 3546 |