mirror of
https://github.com/ACINQ/eclair.git
synced 2024-11-20 02:27:32 +01:00
bfd25fa021
When a new connection happens while already connected, the `Peer` will switch to the new connection. In the current implementation, upon receiving a `ConnectionReady`, the `Peer` will kill the current connection, then sends back the `ConnectionReady` message to itself. In the meantime, the `PeerConnection` will happily forward any incoming messages to the `Peer`. This opens up to a race in the `Peer`'s mailbox between the `ConnectionReady` message, and any incoming messages from the new connection. If the latter win, they will get dropped because the `Peer` is in state `DISCONNECTED`. Typically those are `ChannelReestablish` messages and channels will get stuck in state `SYNCING`. This PR make the `Peer` atomically switch to the new connection, without going back to the `DISCONNECTED` state. As a result, we now have a `CONNECTED`->`CONNECTED` transition. |
||
---|---|---|
.. | ||
src | ||
eclair-cli | ||
pom.xml |