]> arthur.barton.de Git - ngircd.git/commitdiff
Don't exit server if closing of a socket fails; instead ignore it and
authorAlexander Barton <alex@barton.de>
Sun, 22 May 2005 23:55:57 +0000 (23:55 +0000)
committerAlexander Barton <alex@barton.de>
Sun, 22 May 2005 23:55:57 +0000 (23:55 +0000)
pray that this will be "the right thing" ...

ChangeLog
src/ngircd/conn.c

index a6e4562f7c3dcdab8f3ec9067dd9ef94d37a1dfd..abfbe5a0edcf6120d083ae4541fb8da47bddc2d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,8 @@
 
 
 ngIRCd CVSHEAD
+  - Don't exit server if closing of a socket fails; instead ignore it and
+    pray that this will be "the right thing" ...
   - Implemented the IRC function "WHOWAS".
   - Don't enable assert() calls when not ./configure'd with --enable-debug.
   - Fixed ./configure test for TCP Wrappers: now it runs on Mac OS X as well.
@@ -599,4 +601,4 @@ ngIRCd 0.0.1, 31.12.2001
 
 
 -- 
-$Id: ChangeLog,v 1.270 2005/05/16 12:25:15 alex Exp $
+$Id: ChangeLog,v 1.271 2005/05/22 23:55:57 alex Exp $
index d9d7d1db10db8a4555aa739721c1b2c4caccd6ae..f076d232b5309550412dea6da68fbb06fd25d101 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: conn.c,v 1.149 2005/04/23 14:28:44 fw Exp $";
+static char UNUSED id[] = "$Id: conn.c,v 1.150 2005/05/22 23:55:58 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -671,10 +671,8 @@ Conn_Close( CONN_ID Idx, char *LogMsg, char *FwdMsg, bool InformClient )
        /* Shut down socket */
        if( close( My_Connections[Idx].sock ) != 0 )
        {
-               /* Oops, we can't close the socket!? This is fatal! */
-               Log( LOG_EMERG, "Error closing connection %d (socket %d) with %s:%d - %s!", Idx, My_Connections[Idx].sock, My_Connections[Idx].host, ntohs( My_Connections[Idx].addr.sin_port), strerror( errno ));
-               Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE_NAME );
-               exit( 1 );
+               /* Oops, we can't close the socket!? This is ... ugly! */
+               Log( LOG_CRIT, "Error closing connection %d (socket %d) with %s:%d - %s! (ignored)", Idx, My_Connections[Idx].sock, My_Connections[Idx].host, ntohs( My_Connections[Idx].addr.sin_port), strerror( errno ));
        }
 
        /* Mark socket as invalid: */