Fix/caller disconnect callee crash#2151
Closed
markope wants to merge 2 commits intocrossbario:masterfrom
Closed
Conversation
added 2 commits
December 31, 2025 13:01
When a caller disconnects while an RPC is in-flight, the router must clean up invocation tracking regardless of whether the callee supports call canceling. Previously, the cleanup was skipped if the callee didn't support call_canceling, leaving stale data structures that caused errors when the callee tried to return a result. The fix: - Always clean up invocation tracking (timeout, data structures) - Only send INTERRUPT message if callee supports call_canceling - Log appropriately in both cases Fixes: crossbario#2133
Contributor
Author
|
closed and replaced by #2153 due to process reasons |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Prevent callee session crash when caller disconnects during RPC
Description
This PR fixes a bug where the callee's session crashes when the caller disconnects during an in-flight RPC call.
Problem
When a WAMP caller disconnects while waiting for an RPC response (e.g., browser page reload), the callee receives an exception and its session is terminated. This happens because:
call_cancelingcontinue)NoneSolution
Always clean up invocation tracking when caller disconnects, regardless of
call_cancelingsupport:Changes
src/crossbar/router/dealer.pyDealer.detach()call_cancelingcheckImpact
call_canceling: No longer crash when caller disconnects; they complete normally and the result is silently discardedcall_canceling: Behavior unchanged (receive INTERRUPT as before)Testing
test_caller_detach_cleans_up_invocation_tracking_without_cancel_supportcall_cancelingsupportExisting tests cover related scenarios:
test_caller_detach_interrupt_cancel_not_supportedtest_caller_detach_interrupt_cancel_supportedFixes
#2133