Bug #4246
closedNet::HTTP does not timeout during SSL connection handshake
Description
=begin
If you open a SSL connection and it hangs while doing the SSL connection handshake then it does not timeout unless you end up hitting a TCP keepalive timeout.
The problem is that the open_timeout is only applied to the actual TCP socket being opened and not the SSL negotiation.
Also an issue in ruby 1.8.{6,7}.
Attached is a patch against 1.9.2. The patch also ensures that the socket gets closed if we error out in connect after it has been opened.
=end
Files
Updated by marcs (Marc Slemko) almost 14 years ago
=begin
This script demonstrates the behavior. It opens a socket listening on port 6666, then opens a SSL connection to it. It should timeout after 5 seconds but it instead just hangs.
=end
Updated by yugui (Yuki Sonoda) almost 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r30520.
Marc, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end