On 14 Jun 2010, at 14:59, Daniel Stenberg wrote:
> On Thu, 10 Jun 2010, Jan Van Boghout wrote:
>
>> The goal of the patch was to time out properly when a connection becomes unresponsive. As it is, libssh2 sometimes just blocks indefinitely waiting for the server to respond -- causing the host app to block its libssh2/SFTP thread as well and making proper higher-level timeout handling impossible. If the server is still responding, the timeout should indeed just cause it to loop back, which is desirable behavior in our case (reading/writing for SFTP).
>
> But the question is: what exactly is the time you specify?
>
> In your patch, it becomes the longest time select() will ever wait for action, but is that really the time a user wants to specify? Won't a user rather want to specify the longest time a particular libssh2 function is allowed to wait or similar?
It effectively determines the amount of time before libssh2 decides that a server has become unresponsive, which is all we wanted to accomplish with this timeout. If data is arriving through the socket, there's no need to limit that data flow to a certain maximum time limit.
Cheers,
Jan
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-06-15