diff src/server.c @ 119:f50cc311e29a noffle

[svn] Leave online mode, if the connection to a remote server fails for avoiding a series of timeouts and holding the lock for a long time.
author enz
date Fri, 30 Jun 2000 08:10:45 +0100
parents 3b4db42990e0
children 3c71e28c8eef
line wrap: on
line diff
--- a/src/server.c	Fri Jun 30 08:09:53 2000 +0100
+++ b/src/server.c	Fri Jun 30 08:10:45 2000 +0100
@@ -1,7 +1,7 @@
 /*
   server.c
 
-  $Id: server.c 159 2000-06-24 20:47:40Z bears $
+  $Id: server.c 167 2000-06-30 07:10:45Z enz $
 */
 
 #if HAVE_CONFIG_H
@@ -237,6 +237,11 @@
         Fetch_getNewArts( grp, OVER );
         Fetch_close();
     }
+    else
+    {
+        Log_inf( "Connection to server failed. Leaving online mode." );        
+        Online_set( FALSE );
+    }
 }
 
 static void
@@ -359,7 +364,11 @@
          || strcmp( s, GRP_LOCAL_SERVER_NAME ) == 0 )
         return FALSE;        
     if ( ! Client_connect( s ) )
+    {
+        Log_inf( "Connection to server failed. Leaving online mode." );        
+        Online_set( FALSE );
         return FALSE;
+    }
     Client_retrieveArt( msgId );
     Client_disconnect();
     return TRUE;