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

Archive Index This month's Index

Subject: Re: EOF status after failed read

Re: EOF status after failed read

From: Peter Stuge <peter_at_stuge.se>
Date: Sat, 23 Jun 2012 09:38:26 +0200

Casper Langemeijer wrote:
> I've discovered that libssh2_channel_eof() does not return 1 after
> libssh2_channel_read_ex() has returned an error (in my case
> LIBSSH2_ERROR_SOCKET_RECV)
>
> The php binding ignored the error, and assumed channel_eof() would indicate
> if a channel was open. Of course I fixed this in the binding, I think there
> is almost no good reason for ignoring a error return value.
>
> Is the behaviour of libssh2_channel_eof()intentional?

A socket error doesn't mean that the channel has been closed. Some
socket errors are transient, even if I agree that this is rare.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-06-23

the libssh2 team