Subject: Re: Strange: libssh2_channel_read() returns 0

Re: Strange: libssh2_channel_read() returns 0

From: Jeremy Knope <jerome_at_ambrosiasw.com>
Date: Wed, 29 Apr 2009 18:25:36 -0400

Delaying before reading looks like it makes it fail 100%. I tried 5
commands (ls) in a row with 1 second delay and it had 0 bytes of data
every time.

Without the delay I got data, then none, then 3rd time it blocked on
read locking my application up (I'm using it in blocking mode)

The block happened on a 2nd call to read. The test app currently
calls read until it gets 0 bytes back then finishes. This is also
testing against localhost and LAN machines so SSH response is fast.

It seemed to not have any problems connecting to a local VM of various
OSes like linux & solaris.
  -- jerome

--
Jeremy Knope / Software Developer / Ambrosia Software, Inc. -- http://www.AmbrosiaSW.com/
On Apr 29, 2009, at 6:14 PM, Daniel Stenberg wrote:
> On Wed, 29 Apr 2009, Jeremy Knope wrote:
>
>> On this note, I still have a problem (only in 1.1) that is similar  
>> to this.
>> libssh2_channel_read() returns 0 on occasion when connected to a OS X
>> machine (10.4 or 10.5 at least)  I'd connect and execute a couple  
>> commands
>> and sometimes I wouldn't get any data for something like a simple  
>> "ls"
>
> Have you tried to delay the reading somewhat to see if it works  
> slightly more
> reliable then? I'm not suggesting it is a fix, but it might help us  
> get some
> clues on what/where the problem is...
>
> -- 
>
>  / daniel.haxx.se
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code  
> vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> libssh2-devel mailing list
> libssh2-devel_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libssh2-devel
>
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2009-04-30