* Updated Remote->call to use timeout again.

* Deleted test.pl, which shouldn't have been in git anyway.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 7 years ago
parent 839bfc8a2d
commit 1f8c27ccfb
  1. 5
      Anvil/Tools/Remote.pm
  2. 15
      test.pl

@ -293,6 +293,8 @@ sub call
ssh_fh => $ssh_fh,
start_time => $start_time,
remote_user => $remote_user,
port => $port,
target => $target,
}});
if (not $shell_call)
@ -409,8 +411,7 @@ sub call
### TODO: Make the timeout user-configurable to handle slow connections. Make it
### 'sys::timeout::{all|host} = x'
my $start_time = [gettimeofday];
$ssh_fh = Net::SSH2->new();
$ssh_fh->timeout(1000);
$ssh_fh = Net::SSH2->new(timeout => 1000);
if (not $ssh_fh->connect($target, $port))
{

@ -1,15 +0,0 @@
#!/usr/bin/perl
#
use strict;
use warnings;
use Anvil::Tools;
my $anvil = Anvil::Tools->new();
$anvil->Log->level({set => 2});
# This is used to initialize the database
my $connections = $anvil->Database->connect();
print "Connections: [$connections]\n";
exit(0);
Loading…
Cancel
Save