X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fconn.c;h=76b0822baff04471d138c062074892a4d08b3741;hp=3e2ca2fad70198b96d3785d61ab9059408146eb7;hb=8a927a1b6aa95e716948aa21ed591381a2676ffc;hpb=eab10c91b795af65bbeb9004354f9686a7bc49f1 diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index 3e2ca2fa..76b0822b 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -9,7 +9,7 @@ * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. * - * $Id: conn.c,v 1.71 2002/09/07 21:35:06 alex Exp $ + * $Id: conn.c,v 1.72 2002/09/07 22:34:44 alex Exp $ * * connect.h: Verwaltung aller Netz-Verbindungen ("connections") */ @@ -289,6 +289,7 @@ Conn_Handler( VOID ) { /* Fuer die Verbindung ist eine "Penalty-Zeit" gesetzt */ FD_CLR( My_Connections[i].sock, &read_sockets ); + FD_CLR( My_Connections[i].sock, &write_sockets ); } } for( i = 0; i < Conn_MaxFD + 1; i++ ) @@ -305,15 +306,22 @@ Conn_Handler( VOID ) tv.tv_usec = 0; /* Auf Aktivitaet warten */ - if( select( Conn_MaxFD + 1, &read_sockets, &write_sockets, NULL, &tv ) == -1 ) + i = select( Conn_MaxFD + 1, &read_sockets, &write_sockets, NULL, &tv ); + if( i == 0 ) { + /* keine Veraenderung an den Sockets */ + continue; + } + if( i == -1 ) + { + /* Fehler (z.B. Interrupt) */ if( errno != EINTR ) { Log( LOG_EMERG, "select(): %s!", strerror( errno )); Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE ); exit( 1 ); } - if(( ! NGIRCd_Quit ) && ( ! NGIRCd_Restart )) continue; + continue; } /* Koennen Daten geschrieben werden? */