diff --git a/src/core/netevent.c b/src/core/netevent.c index c973bfc..e875bba 100644 --- a/src/core/netevent.c +++ b/src/core/netevent.c @@ -203,7 +203,7 @@ void net_on_accept(struct net_connection* con, int event, void *arg) if (acl_is_ip_banned(hub->acl, addr)) { LOG_INFO("Denied [%s] (IP banned)", addr); - net_con_close(con); + net_close(fd); continue; } @@ -211,7 +211,7 @@ void net_on_accept(struct net_connection* con, int event, void *arg) if (!probe) { LOG_ERROR("Unable to create probe after socket accepted. Out of memory?"); - net_con_close(con); + net_close(fd); break; } }