Subject: Re: [PATCH] Follow RFC4253 section 11.4

Re: [PATCH] Follow RFC4253 section 11.4

From: Steven Dake <>
Date: Fri, 02 Mar 2012 10:41:33 -0700

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.

Received on 2012-03-02