Fixed two cases of bad connection close.

This commit is contained in:
Jan Vidar Krey 2010-01-21 23:54:38 +01:00
parent b29da11f3b
commit 8b7f09c7f4

View File

@ -228,7 +228,7 @@ void net_on_accept(struct net_connection* con, int event, void *arg)
if (acl_is_ip_banned(hub->acl, addr)) if (acl_is_ip_banned(hub->acl, addr))
{ {
LOG_INFO("Denied [%s] (IP banned)", addr); LOG_INFO("Denied [%s] (IP banned)", addr);
net_close(fd); net_con_close(con);
continue; continue;
} }
@ -236,7 +236,7 @@ void net_on_accept(struct net_connection* con, int event, void *arg)
if (!probe) if (!probe)
{ {
LOG_ERROR("Unable to create probe after socket accepted. Out of memory?"); LOG_ERROR("Unable to create probe after socket accepted. Out of memory?");
net_close(fd); net_con_close(con);
break; break;
} }
} }