hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera" <asan...@apache.org>
Subject Keeping track of Socket Timeout set time
Date Sun, 26 Jun 2011 07:52:32 GMT
Hi All

I've come across this following case:
1. We establish an outgoing connection and set the socket timeout to 5 
seconds (Time = t0 )
2. After receiving the response, we want to keep the socket open for 
reuse for 30 seconds, and we update the timeout (Time = t1)
3. After 6 seconds since #2 above, we get an opportunity to reuse this 
connection, and again we set the socket timeout to 5 seconds
4. Almost immediately, the BaseIOReactor timeout check most definitely 
notices that the time the socket was last used (t1) is over 5 seconds 
from the current time, and times out the socket

I've made a patch to overcome this, but would like to hear if there are 
any comments on it before applying..


PS: I've also been writing a ChunkDecoder capable of being a 
FileContentDecoder.. and want to submit it for review. Oleg, do you have 
any plans of making the 4.1.2 release soon?

Asankha C. Perera
AdroitLogic, http://adroitlogic.org


View raw message