X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fsignal.c;h=24e399d6490ade57b73a94ac9573944e6ce7b3a7;hb=92892abf0475e067732465fe018ebead6485dd62;hp=9acfd2cdbde71374994c438a4f0b32be81b4819f;hpb=cee5525a5937307077e367dfa0f9df85f7f0b817;p=NeonServV5.git diff --git a/src/signal.c b/src/signal.c index 9acfd2c..24e399d 100644 --- a/src/signal.c +++ b/src/signal.c @@ -1,4 +1,4 @@ -/* signal.c - NeonServ v5.5 +/* signal.c - NeonServ v5.6 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -18,6 +18,7 @@ #include "bots.h" #include "ChanNode.h" #include "ClientSocket.h" +#include "IOHandler.h" #include "ConfigParser.h" static void sigcrash(); @@ -85,8 +86,9 @@ static void sigcrash(int signum) { struct ClientSocket *bot; for(bot = getBots(SOCKET_FLAG_READY, NULL); bot; bot = getBots(SOCKET_FLAG_READY, bot)) { if((bot->flags & SOCKET_FLAG_CONNECTED)) { - close(bot->sock); + iohandler_close(bot->iofd); bot->flags &= ~(SOCKET_FLAG_CONNECTED | SOCKET_FLAG_READY); + bot->iofd = NULL; } } putlog(LOGLEVEL_INFO, "hard shutdown...\n");