From c7855be25c379206a1bddd2bbd76e11cc642c8f8 Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 26 Nov 2014 08:22:35 +0000 Subject: use clock_gettime to avoid object creation git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3