Merge pull request #1081 from Artistic-Cabbage/close-fd-after-blacklist

Add missing close after blacklisted connection attempt.
This commit is contained in:
csoler 2017-10-25 18:51:16 +02:00 committed by GitHub
commit 0931779c6f

View File

@ -378,6 +378,11 @@ int pqissllistenbase::acceptconnection()
if(rsBanList != NULL && !rsBanList->isAddressAccepted(remote_addr, RSBANLIST_CHECKING_FLAGS_BLACKLIST))
{
std::cerr << " => early rejected at this point, because of blacklist." << std::endl;
#ifndef WINDOWS_SYS
close(fd);
#else
closesocket(fd);
#endif
return false ;
}
else