Subject: Re: timeouts in libssh2 blocking-mode

Re: timeouts in libssh2 blocking-mode

From: Matt Lilley <>
Date: Tue, 03 May 2011 11:26:21 +1200

> I suggest we:
> A) mark the time when the function is first entered.
> B) when select() is about to be called, we can check how long time that
> has elapsed since the entry time and just do the math on how long the
> select timeout may be (this time).
Ok, that seems reasonable to me. I've attached a new patch that does
this (I think), and still passes my test cases. I assumed that because
the macro BLOCK_ADJUST (and BLOCK_ADJUST_ERRNO) were the only places
we'd end up in _libssh2_wait_socket, that this was as good a place as
any to mark the entry time, and they all seem to be at the beginning of
exposed API functions.

Any further thoughts?


> --
> /
> _______________________________________________
> libssh2-devel

Matt Lilley
Software Engineer
Tel:    +64 4 912-2100
Fax:    +64 4 912-2101
This e-mail has passed our content security scan.
It is covered by the confidentiality clauses at
Received on 2011-05-03