Remove tcp_closer
This commit is contained in:
@ -116,3 +116,15 @@ static int tcp_acceptor(client_ctx_t *ctx) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void tcp_close(client_ctx_t *ctx) {
|
||||
logger_set_prefix("[%*s]%s", INET6_ADDRSTRLEN, ctx->socket.s_addr, ctx->log_prefix);
|
||||
|
||||
sock_close(&ctx->socket);
|
||||
|
||||
ctx->cnx_e = clock_micros();
|
||||
char buf[32];
|
||||
info("Connection closed (%s)", format_duration(ctx->cnx_e - ctx->cnx_s, buf));
|
||||
|
||||
memset(ctx, 0, sizeof(*ctx));
|
||||
}
|
||||
|
Reference in New Issue
Block a user