summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2005-04-06 11:15:07 +0000
committerDaouda Lo <daouda@mandriva.com>2005-04-06 11:15:07 +0000
commitbb9c317a03da6a33c67a9e5533539b535facd829 (patch)
tree78e5bab5f1bfe30acc3051cfd1eb8ec171bf2f8e
parentac39baef4405949b8cd1465028cb7176d5a26bab (diff)
downloadmgaonline-bb9c317a03da6a33c67a9e5533539b535facd829.tar
mgaonline-bb9c317a03da6a33c67a9e5533539b535facd829.tar.gz
mgaonline-bb9c317a03da6a33c67a9e5533539b535facd829.tar.bz2
mgaonline-bb9c317a03da6a33c67a9e5533539b535facd829.tar.xz
mgaonline-bb9c317a03da6a33c67a9e5533539b535facd829.zip
- better error handling and logging when server is down
-rwxr-xr-xmdkapplet6
1 files changed, 5 insertions, 1 deletions
diff --git a/mdkapplet b/mdkapplet
index 74e0ea19..5d4093bf 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -240,7 +240,11 @@ sub silentCheck {
logIt(N("Connecting to") . " $link ...\n");
gtkflush(); go2State('busy'); gtkflush();
my $response = mdkonline::get_from_URL($link, 'MdkAppletAgent/0.1');
- $response->is_success or go2State('disconnected'), return;
+ if ($response->is_error) {
+ my $status_err = $response->status_line;
+ go2State('critical');
+ logIt("Unable to contact Mandrakeonline server: $status_err") and return;
+ }
$ct = $response->content;
if ($debug) {
print "\nCONTENTS = $ct\n" if $debug;