1
This commit is contained in:
parent
2412079864
commit
6495be8f92
@ -254,4 +254,14 @@ void GGListener::RemoveSocketDisconnectHandler(std::weak_ptr<SocketDisconnectHan
|
||||
void GGListener::OnClientDisconnect(int socket_handle)
|
||||
{
|
||||
PlayerMgr::Instance()->OnClientDisconnect(socket_handle);
|
||||
auto itr = disconnect_listener_hash_.find(socket_handle);
|
||||
if (itr != disconnect_listener_hash_.end()) {
|
||||
std::vector<std::weak_ptr<SocketDisconnectHandler>> del_handlers;
|
||||
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}));
|
||||
}
|
||||
disconnect_listener_hash_.erase(itr);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user