mikeal / sequest

Simplified API for SSH and SFTP similar to request.
283 stars 24 forks source link

sometimes, it hangs with at endReadableNT (_stream_readable.js:905:12) #36

Open maboiteaspam opened 8 years ago

maboiteaspam commented 8 years ago

Hi,

Given that code,

var checkPhp = function (expect, ip, port, user, pwd, done) {
  var seq = sequest.connect(user+'@'+ip+':'+port, {username: user, password: pwd});
  seq('php --version', function (e, stdout) {
    if (e) return done(e)
    stdout.should.match(expect)
    done()
  }).on('error', function (err) {
    done(err)
  })
};

Sometimes, works fine, sometimes, it throws

1) #Php.version() yyy.yyy.yyy.oo:xxx should be php like /PHP\s5[.]3[.]3/:
     Error: Exit code is non-zero.
      at endReadableNT (_stream_readable.js:905:12)

So as example, i run 4 instances of mocha in //. Over the 4, one will fail.

It s really weird... Have you faced that too ?