* 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>
This commit is contained in:
parent
839bfc8a2d
commit
1f8c27ccfb
@ -293,6 +293,8 @@ sub call
|
|||||||
ssh_fh => $ssh_fh,
|
ssh_fh => $ssh_fh,
|
||||||
start_time => $start_time,
|
start_time => $start_time,
|
||||||
remote_user => $remote_user,
|
remote_user => $remote_user,
|
||||||
|
port => $port,
|
||||||
|
target => $target,
|
||||||
}});
|
}});
|
||||||
|
|
||||||
if (not $shell_call)
|
if (not $shell_call)
|
||||||
@ -409,8 +411,7 @@ sub call
|
|||||||
### TODO: Make the timeout user-configurable to handle slow connections. Make it
|
### TODO: Make the timeout user-configurable to handle slow connections. Make it
|
||||||
### 'sys::timeout::{all|host} = x'
|
### 'sys::timeout::{all|host} = x'
|
||||||
my $start_time = [gettimeofday];
|
my $start_time = [gettimeofday];
|
||||||
$ssh_fh = Net::SSH2->new();
|
$ssh_fh = Net::SSH2->new(timeout => 1000);
|
||||||
$ssh_fh->timeout(1000);
|
|
||||||
if (not $ssh_fh->connect($target, $port))
|
if (not $ssh_fh->connect($target, $port))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
15
test.pl
15
test.pl
@ -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…
Reference in New Issue
Block a user