Subject: libssh2_channel_close/libssh2_channel_free hangs if you execute long-running command

libssh2_channel_close/libssh2_channel_free hangs if you execute long-running command

From: Pavel Strashkin <pavel.strashkin_at_gmail.com>
Date: Thu, 13 Oct 2011 17:21:09 -0700

Hello folks,

There is the commands like iostat or mpstat which can be run for a
long time (useful for gathering statistics from remote servers).
The commands support [interval] parameter. Every [interval] seconds
they print some data which means nothing happens for [interval]
seconds.
Here we go. I read first block of data, then command "sleeps" for a
[interval] seconds, i do libssh2_channel_close or
libssh2_channel_free, and it hangs for [interval] seconds. I can't
close channel or session graceful.
As a workaround i do close on a socket directly before closing channel/session.

Thank you!
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-10-14