You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are two connected clients, and one of them closes the connection, then it is possible that the topic message listeners will be removed for both clients if the emitter implementation does not include a flag to check whether the subscription for a given listener has been removed. For example, mqemitter-redis does not do this and sends an unsubscribe command, so the second client will stop receiving new messages from the topic.
The text was updated successfully, but these errors were encountered:
When a client closes WS connection it calls the close method of the
SubscriptionContext
twice.Triggered by:
mercurius/lib/subscription.js
Lines 56 to 58 in 01a007d
And here:
mercurius/lib/subscription-connection.js
Lines 331 to 333 in 01a007d
It produces two
removeListener
calls:mercurius/lib/subscriber.js
Lines 17 to 19 in 01a007d
If there are two connected clients, and one of them closes the connection, then it is possible that the topic message listeners will be removed for both clients if the emitter implementation does not include a flag to check whether the subscription for a given listener has been removed. For example, mqemitter-redis does not do this and sends an unsubscribe command, so the second client will stop receiving new messages from the topic.
The text was updated successfully, but these errors were encountered: