zaadjis created JRUBY-6511:
------------------------------
Summary: Timeout doesn't work when https server not responding
Key: JRUBY-6511
URL: https://jira.codehaus.org/browse/JRUBY-6511
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules, OpenSSL
Affects Versions: JRuby-OpenSSL 0.7, JRuby 1.6.7
Environment: $ ruby --version
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (OpenJDK 64-Bit Server VM
1.6.0_23) [linux-amd64-java]
$ gem list
*** LOCAL GEMS ***
bouncy-castle-java (1.5.0146.1)
bundler (1.0.22)
jruby-openssl (0.7.6.1)
rake (0.8.7)
Reporter: zaadjis
{noformat}
$ rvm use system
$ ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
$ ruby server.rb &
[1] 5924
Listening on port 8043
$ time curl -m 3 -k https://localhost:8043
"GET / HTTP/1.1\r\n"
curl: (28) Operation timed out after 3001 milliseconds with 0 bytes received
real 0m3.011s
user 0m0.008s
sys 0m0.012s
$ time ruby client.rb
"POST /foo HTTP/1.1\r\n"
/usr/lib/ruby/1.8/timeout.rb:64:in `rbuf_fill': execution expired
(Timeout::Error)
from /usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
from /usr/lib/ruby/1.8/net/http.rb:2028:in `read_status_line'
from /usr/lib/ruby/1.8/net/http.rb:2017:in `read_new'
from /usr/lib/ruby/1.8/net/http.rb:1051:in `request'
from client.rb:38
from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
from client.rb:38
from /usr/lib/ruby/1.8/timeout.rb:67:in `timeout'
from /usr/lib/ruby/1.8/timeout.rb:101:in `timeout'
from client.rb:37
real 0m2.075s
user 0m0.056s
sys 0m0.012s
$ rvm use jruby
$ ruby --version
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (OpenJDK 64-Bit Server VM
1.6.0_23) [linux-amd64-java]
$ gem list
*** LOCAL GEMS ***
bouncy-castle-java (1.5.0146.1)
bundler (1.0.22)
jruby-openssl (0.7.6.1)
rake (0.8.7)
$ time ruby client.rb
"POST /foo HTTP/1.1\r\n"
^C
real 0m24.111s
user 0m5.460s
sys 0m0.140s
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email