Async check if closed

This commit is contained in:
2023-01-02 16:52:18 +01:00
parent a4c0093fbe
commit 51d85cc99f
4 changed files with 78 additions and 45 deletions

View File

@ -50,7 +50,7 @@ static int handle_request_cb(client_ctx_t *ctx) {
int handle_request(client_ctx_t *ctx) {
if (ctx->c_keep_alive && ctx->s_keep_alive) {
return async(ctx->socket.socket, POLLIN, 0, (void (*)(void *)) handle_request_cb, ctx, (void (*)(void *)) tcp_close, ctx);
return async(&ctx->socket, POLLIN, 0, (void (*)(void *)) handle_request_cb, ctx, (void (*)(void *)) tcp_close, ctx);
} else {
tcp_close(ctx);
return 0;