aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2024-01-03 10:28:25 +0200
committerSyndamia <kamen@syndamia.com>2024-01-03 10:28:25 +0200
commitc633a581d0154e55cfd4773729376afe7bb40d2f (patch)
treeb94d550c0d46452d550bc13b89bc0fd2f83a5e1a
parent1110da9fcb82d068907b7800f8dc208ed66281a1 (diff)
downloadpico-web-c633a581d0154e55cfd4773729376afe7bb40d2f.tar
pico-web-c633a581d0154e55cfd4773729376afe7bb40d2f.tar.gz
pico-web-c633a581d0154e55cfd4773729376afe7bb40d2f.zip
[server] Fixed Resource temporarily unavailable error when exiting
-rw-r--r--server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.c b/server.c
index da503ab..dab19b4 100644
--- a/server.c
+++ b/server.c
@@ -153,7 +153,7 @@ int main(int argc, char* argv[]) {
*/
fd_client = accept(fd_socket, (struct sockaddr*)&sa_client, &sa_client_size);
- herrc(fd_client, "accept");
+ if (acceptConnections) herrc(fd_client, "accept");
if (fd_client < 0) continue;
char* strAddr = inet_ntoa(sa_client.sin_addr);