Subject: Keep-alive problems in 1.2.6 + poll() mistake

Keep-alive problems in 1.2.6 + poll() mistake

From: Jan Van Boghout <>
Date: Fri, 16 Jul 2010 21:33:43 +0200

Hello List,

I just got around to trying 1.2.6 and discovered that libssh2_keepalive_config() was added a while back. Yay, this could get rid of custom patches... Unfortunately, when I enable it libssh2 won't even establish a proper channel to the server. These are the debug traces of both scenarios, in the hope that someone with more insight into the inner workings can make sense of them:

There's also a mistake in session.c when poll() is available (line 567 in 1.2.6). Poll() takes its timeout in milliseconds, so the / 1000 should be * 1000. Relevant snippet:

rc = poll(sockets, 1, seconds_to_next ? seconds_to_next / 1000 : -1);


Received on 2010-07-16