www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Force deallocate all resources within session

Force deallocate all resources within session

From: Anton Obukhov <anton_at_ubnt.com>
Date: Fri, 22 Feb 2013 19:05:54 +0400

Hi, I'm having the following scenario: I manage a bunch of remote devices,
and some of them may sit on a bad connection. Whenever I detect that the
connection is unsatisfactory, I want to shutdown all the channels, session
and resources, linked to the session.

The problem is - if say the device went down, all the functions (including
libssh2_session_free) return EAGAIN, and I seem to leak a lot of resources
if I keep it as is... So now all I do is I close the socket linked to the
session. What I'd like to do is to tell libssh to force close & deallocate
a selected resource (channel, session, etc). Is there a way for it?


libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2013-02-22

the libssh2 team