Commit d44e7632 by qlintonger xeno

阐释添加额外消息发送+2.567

parent 0630816f
......@@ -81,6 +81,12 @@ pub async fn insert_this_connection(
"idle", "", device_id, from_id, has_camera, has_mike, user_call_group, from_name_decoded
);
{
// 获取写锁以进行写操作
ONLINE_USERS.insert(from_id.to_string(), user_info_str);
println!("成功将用户id: {} 的信息插入到 ONLINE_USERS 中", from_id);
}
let mut con = REDIS_POOL
.get_connection()
.expect("Failed to get Redis connection");
......@@ -92,11 +98,5 @@ pub async fn insert_this_connection(
);
return Err(e);
}
{
// 获取写锁以进行写操作
ONLINE_USERS.insert(from_id.to_string(), user_info_str);
println!("成功将用户id: {} 的信息插入到 ONLINE_USERS 中", from_id);
}
Ok(())
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment