#431 sshcollector calls die() even if all the work is not done - stromsoe

This commit is contained in:
Oliver Gorwits
2018-10-19 14:59:32 +01:00
parent d4b79f685b
commit 2818591462
8 changed files with 40 additions and 8 deletions

View File

@@ -50,7 +50,11 @@ sub arpnip {
debug "$hostlabel $$ arpnip()";
my ($pty, $pid) = $ssh->open2pty or die "unable to run remote command";
my ($pty, $pid) = $ssh->open2pty;
unless ($pty) {
debug "unable to run remote command [$hostlabel] " . $ssh->error;
return ();
}
my $expect = Expect->init($pty);
my ($pos, $error, $match, $before, $after);