I assume the default is "blocking". I tried strace and it seems like the
socket discover that peer disconnected once the hardware is back if the
timeout is long enough but it totally halts the break.
This is the last line from strace during the break:
send(3,
"\350\250/\354\313{\245*O\336\252\353m\20\332v;@\33t\325\345o\322\233G\34\210\241\263\266/"...,
1076, MSG_NOSIGNAL) = 992
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1
Still it would be useful to have the option of a timeout for the write
in the API if that is not avaliable already.
Daniel Stenberg skrev 2012-05-28 16:14:
> On Mon, 28 May 2012, Olof Tångrot wrote:
>
>> Version: 1.4.2. returns -5 which seems to indicate a fault in the
>> key-exchange.
>>
>> 1) A correct fault code should be resturned.
>
> Can you provide trace logs for when the breakage and this error occur?
>
>> 2) Is it possible to avoid the blocking when the hardware is
>> disconnected?
>
> Are you using blocking or non-blocking mode at the time? TCP is not
> really equipped to detect "disconnection" that easily.
>
>
>
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
-- Olof Tångrot Omicron Ceti AB Götgatan 3, 903 27 Umeå, SWEDEN Tel: +46 90 170856 Mobil: +46 70 661 64 60 olof.tangrot_at_omicron.se <mailto:olof.tangrot_at_omicron.se> www.omicron.se <http://www.omicron.se>
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-05-28