Release ice instance when a user leave transmission

This commit is contained in:
dijunkun
2023-08-24 09:57:55 +08:00
parent 2e28ad61f8
commit e31405c78b
4 changed files with 44 additions and 16 deletions

View File

@@ -88,6 +88,7 @@ websocketpp::connection_hdl TransmissionManager::GetWsHandle(
std::string TransmissionManager::GetUserId(websocketpp::connection_hdl hdl) {
for (auto it = user_id_ws_hdl_list_.begin(); it != user_id_ws_hdl_list_.end();
++it) {
LOG_INFO("[{}]", it->first);
if (it->second.lock().get() == hdl.lock().get()) return it->first;
}
return "";