From 8e579f4601c6c63eba1944521e0bacdc255e25e9 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Mon, 5 Apr 2010 13:44:17 +0200 Subject: [PATCH] Fix #123: accept() fails if IP is banned. --- src/core/netevent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } }