# HG changeset patch
# User enz
# Date 962349045 -3600
# Node ID f50cc311e29a3348ebfd3e16159e42540ba0bbab
# Parent  ac9c0492daca9fc890752754c188340b9abde59f
[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.

diff -r ac9c0492daca -r f50cc311e29a src/server.c
--- 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;