diff options
author | Knut Auvor Grythe <knut@auvor.no> | 2015-04-04 08:12:36 +0200 |
---|---|---|
committer | root <root@einstein.tg15.gathering.org> | 2015-04-04 08:12:36 +0200 |
commit | b62cd617019e31c689eb4326591a07e9d58d31af (patch) | |
tree | e022796068d73549c1cf1f3dc502289c63af0b40 /clients | |
parent | fc1b728836d79156655672c7d625ae5b24434cde (diff) |
Proper disconnect handling for smanagrun
Diffstat (limited to 'clients')
-rwxr-xr-x | clients/smanagrun.pl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clients/smanagrun.pl b/clients/smanagrun.pl index 0e2302e..9df4b96 100755 --- a/clients/smanagrun.pl +++ b/clients/smanagrun.pl @@ -104,7 +104,7 @@ while (1) { $error = $sgetallpoll->execute($switch->{sysname}); if (!$error) { print "Could not execute sgetallpoll\n".$dbh->errstr(); - $conn->close; + switch_disconnect($ssh); next; } while (my $row = $sgetallpoll->fetchrow_hashref()) { @@ -142,8 +142,7 @@ while (1) { my $result = join("\n", @data); $sresult->execute($result, $row->{id}); } - $conn->close(); - waitpid($ssh->{pid}, 0); + switch_disconnect($ssh); $sunlock->execute($switch->{sysname}); }; if ($@) { |