[ruby-core:94371] [Ruby master Bug#8590] Second call of https.get results in timeout
From:
merch-redmine@...
Date:
2019-08-15 19:49:57 UTC
List:
ruby-core #94371
Issue #8590 has been updated by jeremyevans0 (Jeremy Evans).
Backport deleted (1.9.3: UNKNOWN, 2.0.0: UNKNOWN)
Status changed from Feedback to Closed
I think this was fixed by commit:711ece42cddc4737a4b1667b1f20ca74030d0255.
----------------------------------------
Bug #8590: Second call of https.get results in timeout
https://bugs.ruby-lang.org/issues/8590#change-80785
* Author: yhara (Yutaka HARA)
* Status: Closed
* Priority: Normal
* Assignee: naruse (Yui NARUSE)
* Target version:
* ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]
* Backport:
----------------------------------------
Hi,
In the following code, second call of https.get results in an error "Connection reset by peer - SSL_connect" after timeout.
---
require "net/https"
https = Net::HTTP.new("secure.nicovideo.jp", 443)
#https = Net::HTTP.new("www.sbisec.co.jp", 443) # same result for this server
https.use_ssl = true
https.ssl_version = 'TLSv1'
https.start{ p https.get('/') } #=> OK
https.start{ p https.get('/') } #=> (Timeout)
---
Expected: prints response twice
Actual: prints response once, and raises the following error after timeout
/Users/yhara/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/net/http.rb:918:in `connect': Connection reset by peer - SSL_connect (Errno::ECONNRESET)
from /Users/yhara/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/net/http.rb:918:in `block in connect'
from /Users/yhara/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
from /Users/yhara/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/net/http.rb:918:in `connect'
from /Users/yhara/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
from /Users/yhara/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/net/http.rb:851:in `start'
Is this a bug of Net::HTTP, or a problem of the server, or just I'm doing something wrong?
Thanks in advance.
---Files--------------------------------
net.http.reuse_ssl_session.patch (2.62 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>