X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2FClientSocket.c;h=eb11d88fc131558ff1bb698f883c37bd91144188;hb=19160d1e7f3bf41a6f7edbc5ec539d4588e1c69a;hp=9112b850e942a828ea1250260feacc1944cdd898;hpb=d5df2d4f914907b38bc20e7c99712eff9b8be69b;p=NeonServV5.git diff --git a/src/ClientSocket.c b/src/ClientSocket.c index 9112b85..eb11d88 100644 --- a/src/ClientSocket.c +++ b/src/ClientSocket.c @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - +#include "main.h" #include "ClientSocket.h" #include "IRCParser.h" #include "UserNode.h" @@ -222,6 +222,8 @@ static IOHANDLER_CALLBACK(socket_callback) { #ifdef HAVE_THREADS unsigned int tid; #endif + if(process_state.running == 0) + return; //just ignore the event (shutdown sequence) switch(event->type) { case IOEVENT_CONNECTED: client->flags |= SOCKET_FLAG_CONNECTED; @@ -296,7 +298,8 @@ void free_sockets(int close_only) { } else destroy_socket(client); } - if(!close_only) + if(!close_only) { free(sockets); - sockets = NULL; + sockets = NULL; + } }