version 1.158, 2002/09/16 20:57:28
|
version 1.159, 2002/10/29 19:53:45
|
Line 1976 END
|
Line 1976 END
|
my $time_remaining = $max_time - (time - $starttime) ; |
my $time_remaining = $max_time - (time - $starttime) ; |
my $last_time = $time_remaining; |
my $last_time = $time_remaining; |
&update_seconds($r,$time_remaining); |
&update_seconds($r,$time_remaining); |
while (($time_remaining > 0) && |
while (($time_remaining > 0) && |
((@Servers_to_contact) || keys(%Server_status))) { |
((@Servers_to_contact) || keys(%Server_status))) { |
# Send out a search request if it needs to be done. |
# Send out a search request if it needs to be done. |
if (@Servers_to_contact) { |
if (@Servers_to_contact) { |
Line 1994 END
|
Line 1994 END
|
# left to contact. |
# left to contact. |
sleep(1); |
sleep(1); |
} |
} |
&update_status($r,'waiting on '.(join(' ',keys(%Server_status)))); |
# |
|
if (scalar (keys(%Server_status))) { |
|
&update_status($r,'waiting on '.(join(' ',keys(%Server_status)))); |
|
} |
|
# |
|
# Loop through the servers we have contacted but do not |
|
# have results from yet, looking for results. |
while (my ($server,$status) = each(%Server_status)) { |
while (my ($server,$status) = each(%Server_status)) { |
last if ($connection->aborted()); |
last if ($connection->aborted()); |
if ($status eq 'con_lost') { |
if ($status eq 'con_lost') { |
Line 2057 END
|
Line 2063 END
|
} |
} |
last if ($connection->aborted()); |
last if ($connection->aborted()); |
# Finished looping through the servers |
# Finished looping through the servers |
|
$starttime = time if (@Servers_to_contact); |
$time_remaining = $max_time - (time - $starttime) ; |
$time_remaining = $max_time - (time - $starttime) ; |
if ($last_time - $time_remaining > 0) { |
if ($last_time - $time_remaining > 0) { |
$last_time = $time_remaining; |
$last_time = $time_remaining; |