diff --git a/server/gameserver/GGListener.cc b/server/gameserver/GGListener.cc index 1dda9a0a..9f4be1e8 100644 --- a/server/gameserver/GGListener.cc +++ b/server/gameserver/GGListener.cc @@ -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); }