-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
The internal class ConnectionMultiplexer.Subscription has logic that is supposed to ensure
that subscriptions are restored when reconnecting, however there seems to be a race condition
regarding in which order unsubscribe/subscribe commands are sent.
Sometimes the client resubscribes as expected but then, several seconds later, it may unsubscribe itself and thus forever be unsubscribed.
I find it a bit suspicious that the Validate-method sends unsubscribe and subscribe
commands using CommandFlags.FireAndForget. The order of these commands is very important but
is the order really preserved when using fire and forget?
Also, this may be unrelated, but it seems to me that there is a Dispose-call missing in PhysicalBridge.OnDisconnected around line 346. This strange unsubscribe-behaviour seems to completely disappear when I dispose the physical connection on disconnect.