Ruby 2.0 added keep_alive_timeout, which behaves the same way as idle_timeout, except that the default timeout is 5 seconds rather than 2 seconds. This means that the default timeout is effectively 2 seconds, and idle_timeout isn't respected when it is greater than 2 seconds.
Solution
Set keep_alive_timeout on the connection using idle_timeout on ruby 2.0.
Fixes issue #39
Problem
Ruby 2.0 added keep_alive_timeout, which behaves the same way as idle_timeout, except that the default timeout is 5 seconds rather than 2 seconds. This means that the default timeout is effectively 2 seconds, and idle_timeout isn't respected when it is greater than 2 seconds.
Solution
Set keep_alive_timeout on the connection using idle_timeout on ruby 2.0.