[Redirector] Fix udpContext not clear

This commit is contained in:
Connection Refused
2021-10-19 16:02:16 +08:00
parent 8a2898666a
commit e9f0d8e69f

View File

@@ -146,13 +146,22 @@ bool eh_init()
if (!DNSHandler::INIT())
return false;
return TCPHandler::INIT();
if (!TCPHandler::INIT())
return false;
return true;
}
void eh_free()
{
lock_guard<mutex> lg(udpContextLock);
TCPHandler::FREE();
for (auto i : udpContext)
delete i.second;
udpContext.clear();
UP = 0;
DL = 0;
}