Index: lib/net/http.rb =================================================================== --- lib/net/http.rb (revision 48533) +++ lib/net/http.rb (working copy) @@ -914,7 +914,10 @@ @socket.write(buf) HTTPResponse.read_new(@socket).value end - s.session = @ssl_session if @ssl_session + if @ssl_session and + Time.now < @ssl_session.time + @ssl_session.timeout + s.session = @ssl_session if @ssl_session + end # Server Name Indication (SNI) RFC 3546 s.hostname = @address if s.respond_to? :hostname= Timeout.timeout(@open_timeout, Net::OpenTimeout) { s.connect }