On 03/01/2012 03:37 PM, Peter Stuge wrote: > Henrik Nordström wrote: >>> This might already be managed within libssh2 though, that >>> keepalives are never sent in the middle of another request. >> >> In blocking mode keepalives are by default sent in the middle of other >> requests by _libssh2_wait_socket. >> >> And applications is very likely to do use libss2_keepalive_send in >> similar manner in non-blocking mode. > > I see. Then the code that receives packets must be changed to take > care of those responses as well. > > >> Also be warned that libssh2_keepalive_send corrupts transport if >> only part of the keep-alive message can be sent. > > Good fun. >
To address this in my code which is nonblocking, should I avoid sending keepalive_send while a channel operation is in progress? Currently the nonblocking app sends the keepalive based upon a timer set by the return from the previous keepalive_send. _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel