Subject: Re: internal poll doesn't handle orderly shut down (read/recv returns 0 bytes) = 100% CPU

Re: internal poll doesn't handle orderly shut down (read/recv returns 0 bytes) = 100% CPU

From: Pavel Strashkin <pavel.strashkin_at_gmail.com>
Date: Wed, 12 Oct 2011 17:08:48 -0700

I don't want to open a new topic so i'll ask here.

libssh2 has 2 entities: session and channel, but only channel has
"eof" or "disconnected" states. I don't see something similar for
session. The question then is how could i know that session is closed
without creating a channel?
As i understand, when libssh2 does low-level reading (read or recv
call) on file handle, it doesn't store information about read/recv
returned zero bytes (connection closed) or errno value so such
information can't be used by libssh2 user.

2011/10/4 Henrik Nordström <henrik_at_henriknordstrom.net>:
> Yes.
>
> tis 2011-10-04 klockan 16:31 +0100 skrev Steven Ayre:
>> Ok. I was just wondering whether Net::SSH2 should be updated if it's
>> still using a depreciated function.
>>
>> -Steve
>>
>>
>> On 3 October 2011 22:03, Daniel Stenberg <daniel_at_haxx.se> wrote:
>>         On Mon, 3 Oct 2011, Pavel Strashkin wrote:
>>
>>
>>                 I'm referring to libssh2_poll.
>>
>>
>>         So did I.
>>
>>
>>
>>         _______________________________________________
>>         libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>>
>>
>
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-10-13