From: hackbard Date: Thu, 6 May 2004 19:18:54 +0000 (+0000) Subject: close all sockets of connections in shutdown process X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=7a95b0cf1636ea70b946b41415f175018ef078ca;p=my-code%2Fivac.git close all sockets of connections in shutdown process --- diff --git a/src/network.c b/src/network.c index 3e9fe39..5fae09d 100644 --- a/src/network.c +++ b/src/network.c @@ -53,6 +53,12 @@ int network_init(t_net *net) { int network_shutdown(t_net *net) { + int channel; + + for(channel=0;channelconnection[channel].status&C_SOCKET) + close(net->connection[channel].fd); + if(close(net->l_fd)==-1) { perror("[network] close call"); return N_ERROR;