Subject: Re: [libssh2] libssh2_sftp_close_handle: how to handle errors

Re: [libssh2] libssh2_sftp_close_handle: how to handle errors

From: Dan Fandrich <>
Date: Thu, 24 Apr 2008 22:55:43 -0700

On Thu, Apr 24, 2008 at 08:35:34PM -0700, J.T. Conklin wrote:
> libssh2_sftp_close_handle() currently returns -1 on failure. What is
> client code supposed to do to handle this?

Good question. If the failure is due to an out of memory condition, then
trying again when more memory is available is probably the right thing.
But in other cases, like if the socket is already closed, then there's
nothing you can do. Problem is, some resources aren't freed in the latter
case, putting you into a catch-22 situation. That should really be fixed
(somehow) in the library.

>>> Dan

--              The web change of address service
          Let webmasters know that your web site has moved
This email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2.;198757673;13503038;p?
libssh2-devel mailing list
Received on 2008-04-25