in reply to Re: Error - A non-blocking socket operation could not be completed immediately.
in thread Error - A non-blocking socket operation could not be completed immediately.

Hi BrowserUK,

Thank you for taking time to reply. I was browsing through PerlMonks a few weeks ago while trying to write a similar script that used the Net::SSH2 module and a thread mentioned to set $chan->blocking(0) to get things working. Tried that and it worked. Now, even when I remove it, I still get the same error.

Perlpetually Indebted To PerlMonks

use Learning::Perl; use Beginning::Perl::Ovid; print "Awesome Books";
http://dwimperl.com/windows.html is a boon for Windows.

Replies are listed 'Best First'.
Re^3: Error - A non-blocking socket operation could not be completed immediately.
by BrowserUk (Patriarch) on Mar 06, 2013 at 19:46 UTC

    I don't have anything useful to add I'm afraid. I posted mainly to point out that the extended error is to be expected (and accommodated) with non-blocking handles; and that the logic of your test code shouldn't require non-blocking socket.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.