node: Fix edge case in persistent peer connections
If two peers are persistent for each other and experience disconnections, it's possible that an outbound connection is turned into an inbound one. But if we don't set that correctly, we'll eventually run into a crash where an already connected peer re-connects, since the disconnection logic checks for the link direction.
This commit is contained in:
parent
c94ce020a1
commit
765fc48c84
|
|
@ -1340,6 +1340,7 @@ where
|
|||
target: "service",
|
||||
"Connecting peer {remote} already has a session open ({peer})"
|
||||
);
|
||||
peer.link = link;
|
||||
peer.to_connected(self.clock);
|
||||
self.outbox.write_all(peer, msgs);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue