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

Keep-alive problems in 1.2.6 + poll() mistake

From: Jan Van Boghout <lists_at_macrabbit.com>
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:

http://macrabbit.com/misc/libssh2/libssh2-log-with-keepalive.txt
http://macrabbit.com/misc/libssh2/libssh2-log-without-keepalive.txt

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);

Cheers,
Jan

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-07-16