1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

use clock_gettime to avoid object creation

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2014-11-26 08:22:35 +00:00
parent d3236ba3b4
commit c7855be25c

View file

@ -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