Skip to content

Commit

Permalink
Add debug print before accepting new clients to detect rejection of n…
Browse files Browse the repository at this point in the history
…ew clients when maximum number of clients is reached
  • Loading branch information
Michael-M-Baron committed Nov 6, 2024
1 parent 244377d commit 5f4d6bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/japi.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,9 @@ int japi_start_server(japi_context *ctx, const char *port)
perror("ERROR: accept() failed\n");
return -1;
}

prntdbg("Client socket to add: %d, current number of clients %d\n", client_socket, ctx->num_clients);

if (ctx->max_clients == 0 || ctx->num_clients < ctx->max_clients) {
japi_add_client(ctx, client_socket);
prntdbg("client %d added\n", client_socket);
Expand Down

0 comments on commit 5f4d6bb

Please sign in to comment.