mirror of
https://github.com/netchx/netch.git
synced 2026-04-13 20:53:22 +08:00
[Redirector] Fix udpContext not clear
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user