Conversation
📝 WalkthroughWalkthroughThe pull request reorganizes RPC request handling in local_participant.rs to register response and ACK handlers before publishing requests, improving error handling cleanup to prevent stale entries in RPC state. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
🔇 Additional comments (1)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This PR fixes this problem:
In perform_rpc (lines 802-822):
match self
.publish_rpc_request(RpcRequest { ... })
.await // ← Network request sent HERE
{
Ok(_) => {
let mut rpc_state = self.local.rpc_state.lock();
rpc_state.pending_acks.insert(id.clone(), ack_tx); // ← Registration AFTER
rpc_state.pending_responses.insert(id.clone(), response_tx);
}
...
}
The sequence is:
Summary by CodeRabbit