summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-04-20 15:13:03 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-04-20 15:13:03 +0000
commit2a840113513b1b5cbdd7dec1edc9c63d5a863310 (patch)
treed93908d131b584680426582dd27210c6d9bbfe1a /lib
parentcc876866faa6ff2e276a2c44bd08a5eced58a310 (diff)
downloaddrakx-net-2a840113513b1b5cbdd7dec1edc9c63d5a863310.tar
drakx-net-2a840113513b1b5cbdd7dec1edc9c63d5a863310.tar.gz
drakx-net-2a840113513b1b5cbdd7dec1edc9c63d5a863310.tar.bz2
drakx-net-2a840113513b1b5cbdd7dec1edc9c63d5a863310.tar.xz
drakx-net-2a840113513b1b5cbdd7dec1edc9c63d5a863310.zip
Testing network connectivity several times before reporting error
(#50098, #49574).
Diffstat (limited to 'lib')
-rw-r--r--lib/network/netconnect.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/network/netconnect.pm b/lib/network/netconnect.pm
index f344b34..895ed0a 100644
--- a/lib/network/netconnect.pm
+++ b/lib/network/netconnect.pm
@@ -309,6 +309,7 @@ If you do not know it, keep the preselected protocol.") },
if ($answer) {
$connection->disconnect;
$connection->connect;
+ # TODO: we should have some graphical notification for these tests
#- FIXME: should use network::test for ppp (after future merge with network::connection)
#- or start interface synchronously
if (!$::isInstall) {
@@ -322,7 +323,13 @@ If you do not know it, keep the preselected protocol.") },
}
}
$success = $connection->get_status();
- $has_internet = network::tools::connected();
+ # try to resolve the network address for some time
+ my $timeout = 3;
+ while ($timeout--) {
+ $has_internet = network::tools::connected();
+ last if $has_internet;
+ sleep 1;
+ }
}
"end"; #- handle disconnection in install?
},