1
This commit is contained in:
parent
6fb944a244
commit
f954be1479
@ -162,6 +162,16 @@ void GGListener::Init()
|
|||||||
|
|
||||||
void GGListener::UnInit()
|
void GGListener::UnInit()
|
||||||
{
|
{
|
||||||
|
std::vector<std::weak_ptr<SocketDisconnectHandler>> del_handlers;
|
||||||
|
for (auto& pair : disconnect_listener_hash_) {
|
||||||
|
SocketDisconnectHandler *handle = nullptr, *tmp = nullptr;
|
||||||
|
list_for_each_entry_safe(handle, tmp, &pair.second, entry) {
|
||||||
|
del_handlers.push_back(handle->holder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (auto& handler : del_handlers) {
|
||||||
|
RemoveSocketDisconnectHandler(handler);
|
||||||
|
}
|
||||||
tcp_listener_ = nullptr;
|
tcp_listener_ = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user