diff options
| Commit | 699cef84b11d43ac23b6bc7b1b605aa8c53f35b6 (patch) | |
|---|---|---|
| Author | 2023-12-08 16:40:31 +0200 | |
| Committer | 2023-12-08 16:40:31 +0200 | |
| Files | b52f0f16e7c338c6dd40bafef34a68809431c80c /server.c | |
| pico-web-699cef84b11d43ac23b6bc7b1b605aa8c53f35b6.tar pico-web-699cef84b11d43ac23b6bc7b1b605aa8c53f35b6.tar.gz pico-web-699cef84b11d43ac23b6bc7b1b605aa8c53f35b6.zip | ||
| Parent | f26e610c2f0bdb07fce3f7a100b3ef6159c2ffe7 (diff) | |
[server] Don't continue on accept() error
1 files changed, 1 insertions, 0 deletions
| -rw-r--r-- | server.c | 1 |
@@ -112,6 +112,7 @@ int main(int argc, char* argv[]) { /* If so, accept the connection and pass execution to the "main" logic */ fd_client = accept(fd_socket, (struct sockaddr*)&sa_client, &sa_client_size); herrc(fd_client, "accept"); + if (fd_client < 0) continue; char* strAddr = inet_ntoa(sa_client.sin_addr); count++; |
