Fix #123: accept() fails if IP is banned.
This commit is contained in:
parent
e220357176
commit
8e579f4601
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue