Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
ws-rst
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qlintonger xeno
ws-rst
Commits
6c413538
Commit
6c413538
authored
Feb 19, 2025
by
qlintonger xeno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cancel-call和call成功,但是出现死锁问题,卡顿在step - 0这里 ==> 已解决
parent
a8e1f401
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/handles/handle_agora_call.rs
+4
-2
No files found.
src/handles/handle_agora_call.rs
View file @
6c413538
...
...
@@ -118,12 +118,13 @@ pub async fn handle_agora_call(
}
let
the_other_caller
=
{
ONLINE_USERS
.get
(
&
to_hangup_id
)
};
// 获取当前用户状态信息成功后,再进行额外操作
if
let
Some
(
the_other_caller_data
)
=
the_other_caller
{
if
let
Some
(
ref
the_other_caller_data
)
=
the_other_caller
{
let
mut
the_other_caller_data
:
Vec
<
String
>
=
the_other_caller_data
.split
(
','
)
.map
(|
s
|
s
.to_string
())
.collect
();
// 提前释放
drop
(
the_other_caller
);
// 如果处于同一频道,则发送挂断信息,
if
the_other_caller_data
[
1
]
==
the_current_user_data
[
1
]
{
let
hangup_message_json
=
serde_json
::
json!
({
...
...
@@ -186,6 +187,7 @@ pub async fn handle_agora_call(
the_current_user_data
[
0
]
=
"idle"
.to_string
();
the_current_user_data
[
6
]
=
"0"
.to_string
();
let
the_current_data_joined
=
the_current_user_data
.join
(
","
)
.to_string
();
drop
(
user_status
);
drop
(
the_current_user_data
);
println!
(
"step - 1.7"
);
ONLINE_USERS
.insert
(
...
...
@@ -580,7 +582,7 @@ pub async fn handle_agora_call(
}
_
=
cancel_rx
.recv
()
=>
{
// 线程被取消
println!
(
"用户已接听或者主动挂断 {}"
,
user_id_clone
);
println!
(
"用户已接听或者主动挂断
或者通话被取消
{}"
,
user_id_clone
);
}
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment