Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event handler leak when cancel an invocation #347

Open
bigbearzhu opened this issue Jul 20, 2022 · 0 comments
Open

Event handler leak when cancel an invocation #347

bigbearzhu opened this issue Jul 20, 2022 · 0 comments

Comments

@bigbearzhu
Copy link
Contributor

Hi @darkl,

Just noticed another leak, but this one is event handler leak when we have lots of RPC calls cancelled. You can try run CallerDealerTests.LeakTestOnCancelCalls from this demo branch

The issue is that every time WampCalleeInvocationHandler.Cancel is called, it creates a temporary WampRpcOperationCallback to get a potential existing WampRpcInvocation. However in WampRpcOperationCallback constructor it connects mMonitor.ConnectionClosed and this event handler is never removed. I'm thinking it probably should not connect in constructor or we will need a different type for the key in the mCallbackToInvocation dictionary that only takes in Session and RequestId from WampRpcOperationCallback.

image

darkl added a commit that referenced this issue Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant