crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

rlinks: duplicate events after reconnect #1916

Closed asimfarooq5 closed 2 years ago

asimfarooq5 commented 2 years ago

If the connection between instance A and B is lost, On connection resume/resubscribe the event causes duplicate results for number of times it reconnects.

The same configuration can be used to reproduce the bug #1909

om26er commented 2 years ago

This issue is real, I can reproduce that. It seems the local leg has the subscriptions even when the remote end disconnected/stopped. In such event the following code is not called https://github.com/crossbario/crossbar/blob/01ec53a100b08a4b78adabe26ab0abb12ba21d5a/crossbar/worker/rlink.py#L167

So we probably need to update on_remote_leave to remove to the remote events subscriptions from the local leg. https://github.com/crossbario/crossbar/blob/01ec53a100b08a4b78adabe26ab0abb12ba21d5a/crossbar/worker/rlink.py#L204

oberstet commented 2 years ago

As a note, it can be daunting/confusing to think about and keep all message interactions for a certain scenario in mind with this rlink stuff. In particular, since those WAMP messages happen at the meta level, and at the app level.

asimfarooq5 commented 2 years ago

It seems to be fixed with proposed branch #1919.