BrowserRelays are stored per PeerID ignoring the generation ID. When connecting to a peer, if a relay for a previous generation is still active, it's used to connect to the remote peer.
That behavior is not working and is causing several problems including not properly cleaning up things as mentioned in the issue #1912.
The fix consist in storing each relay based on the PeerID + the generation ID and never try to use an older relay to connect to a peer that has advertised a newer generation.
The first tests show that the performance of creating multiple new sessions in a short amount of time are really good, the replication happens almost instantaneously.
This issue is related to https://github.com/thaliproject/Thali_CordovaPlugin/issues/1912
BrowserRelays are stored per PeerID ignoring the generation ID. When connecting to a peer, if a relay for a previous generation is still active, it's used to connect to the remote peer. That behavior is not working and is causing several problems including not properly cleaning up things as mentioned in the issue #1912.
The fix consist in storing each relay based on the PeerID + the generation ID and never try to use an older relay to connect to a peer that has advertised a newer generation.
The first tests show that the performance of creating multiple new sessions in a short amount of time are really good, the replication happens almost instantaneously.