igrigorik/em-http-request — Issue #149: inactivity timeout oddities
Author: jormon
Created: 2011-10-26 00:28:53+00:00
State: open

https://github.com/jormon/em-http-request/commit/6ffe637c97f5383108e94e95ce05f9bf12bb60db

The above commit exposes some strange behavior with regards to the inactivity timeout exposed by em-http-request. In both of the new tests introduced, the request should timeout in 10-11 seconds given the 1 second heartbeat interval. Instead both tests timeout in ~15s. I realize it's not feasible to have tests of this length in the codebase, but I'm curious as to what the ultimate cause of this problem is and if there's anything we can do to resolve it.

I tested this code in two environments. It failed the two new tests the same way in each environment:
- Mac OSX 10.7, rvm 1.8.0, ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0]
- Linux 2.6.18-238.19.1.el5 x86_64, rvm 1.2.4, ruby 1.9.2p174 (2011-01-28 revision 30696) [x86_64-linux]