summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-26 08:22:35 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-26 08:22:35 +0000
commitc7855be25c379206a1bddd2bbd76e11cc642c8f8 (patch)
tree6f796db192b56d7cc5da35acac6280bf97388947
parentd3236ba3b4652eb9e66474b4fe6642a1d2884cbf (diff)
use clock_gettime to avoid object creation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/net/http.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index b5706c5..957cb35 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