Skip to content

Commit

Permalink
Fix deadlocked engine in RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
bcherry committed Dec 19, 2024
1 parent 9143e2c commit d7c8cda
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions livekit/src/room/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,16 +699,19 @@ impl RoomSession {
log::warn!("Received RPC request with null caller identity");
return Ok(());
}
self.local_participant
.handle_incoming_rpc_request(
caller_identity.unwrap(),
request_id,
method,
payload,
response_timeout,
version,
)
.await;
let local_participant = self.local_participant.clone();
livekit_runtime::spawn(async move {
local_participant
.handle_incoming_rpc_request(
caller_identity.unwrap(),
request_id,
method,
payload,
response_timeout,
version,
)
.await;
});
}
EngineEvent::RpcResponse { request_id, payload, error } => {
self.local_participant.handle_incoming_rpc_response(request_id, payload, error);
Expand Down

0 comments on commit d7c8cda

Please sign in to comment.