This commit is contained in:
aozhiwei 2024-08-28 11:22:22 +08:00
parent 6495be8f92
commit 6f46958b5b

View File

@ -260,7 +260,11 @@ void GGListener::OnClientDisconnect(int socket_handle)
SocketDisconnectHandler *handle = nullptr, *tmp = nullptr;
list_for_each_entry_safe(handle, tmp, &itr->second, entry) {
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);
}