Prevent Connect scan leaking 1 socket per hostgroup. Fixes #3086

This commit is contained in:
dmiller 2025-06-13 20:57:15 +00:00
parent b8a344ca20
commit 3704a278be

View file

@ -130,8 +130,11 @@ ConnectScanInfo::ConnectScanInfo() {
FD_ZERO(&fds_except);
}
/* Nothing really to do here. */
ConnectScanInfo::~ConnectScanInfo() {}
ConnectScanInfo::~ConnectScanInfo() {
if (nextSD >= 0) {
close(nextSD);
}
}
bool ConnectScanInfo::sendOK() {
if (numSDs >= maxSocketsAllowed)