Async check if closed
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user