[tor-dev] TOR control protocol timeout

Sean Robinson seankrobinson at gmail.com
Sun Jun 19 17:50:34 UTC 2011


On Sun, Jun 19, 2011 at 9:55 AM, Damian Johnson <atagar1 at gmail.com> wrote:
>>  Is there a defined timeout for the TOR control protocol?  How long
>> should a control port client wait around for socket data when reading?
>>  Or writing?  The only references to timeouts that I find in
>> control-spec.txt are about circuit and stream timeouts reported back
>> through the control port.
>
> I'm not aware of one (though that certainly doesn't mean there isn't
> any). What in particular are you trying to solve? -Damian

I've been looking at TorUtil.BufSock.readline() and the problems
atagar has found.  I have found similar problems and I would like to
solve this issue.

The recent merges mikeperry did from you and atagar do not really fix
the problem (as I see it).  atagar's timeout was way too short in my
testing.  And your commits returned the tree to a blocking socket
mode.

I would like to have readline() detect when a socket error has
occurred.  My research indicates that timeouts are the only reliable
method to decide a problem has occurred with a socket.  But, there
seems there is no guidance from the TOR docs about how long a client
should wait for a reply from the TOR daemon.

-- 
Sean Robinson
WiFi Radar - http://wifi-radar.berlios.de
Python WiFi - http://pythonwifi.wikispot.org
pymnl - http://pymnl.wikispot.org


More information about the tor-dev mailing list