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.

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.LeakTestOnCancelCallsfrom this demo branchThe issue is that every time
WampCalleeInvocationHandler.Cancelis called, it creates a temporaryWampRpcOperationCallbackto get a potential existingWampRpcInvocation. However inWampRpcOperationCallbackconstructor it connectsmMonitor.ConnectionClosedand 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 themCallbackToInvocationdictionary that only takes inSessionandRequestIdfromWampRpcOperationCallback.