1
This commit is contained in:
parent
6495be8f92
commit
6f46958b5b
@ -260,7 +260,11 @@ void GGListener::OnClientDisconnect(int socket_handle)
|
|||||||
SocketDisconnectHandler *handle = nullptr, *tmp = nullptr;
|
SocketDisconnectHandler *handle = nullptr, *tmp = nullptr;
|
||||||
list_for_each_entry_safe(handle, tmp, &itr->second, entry) {
|
list_for_each_entry_safe(handle, tmp, &itr->second, entry) {
|
||||||
del_handlers.push_back(handle->holder);
|
del_handlers.push_back(handle->holder);
|
||||||
//handle->cb(a8::Args({itr->first}));
|
}
|
||||||
|
for (auto& handler_wp : del_handlers) {
|
||||||
|
if (!handler_wp.expired()) {
|
||||||
|
handler_wp.lock()->cb(a8::Args({socket_handle}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
disconnect_listener_hash_.erase(itr);
|
disconnect_listener_hash_.erase(itr);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user