]> Nishi Git Mirror - tewi.git/commitdiff
fix select
authorNishi <nishi@nishi.boats>
Thu, 19 Sep 2024 13:07:22 +0000 (13:07 +0000)
committerNishi <nishi@nishi.boats>
Thu, 19 Sep 2024 13:07:22 +0000 (13:07 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@89 8739d7e6-ffea-ec47-b151-bdff447c6205

Server/server.c

index 3ceef41d6707a7244f6adb0fb25c65e80ddbad57..a3951041582396ccd2f7bfa265032b661859b28f 100644 (file)
@@ -828,6 +828,8 @@ void tw_server_loop(void) {
 #else
                                        pid_t pid = fork();
                                        if(pid == 0) {
+                                               int j;
+                                               for(j = 0; j < sockcount; j++) close_socket(sockets[j]);
                                                tw_server_pass(sock, config.ports[i] & (1ULL << 32), config.ports[i], claddr);
                                                _exit(0);
                                        } else {