peer: enforce strict timeout on opening handshake
This commit modifies the logic around the opening p2p handshake to enforce a strict timeout around the receipt of the responding init message. Before this commit, it was possible for the daemon and certain RPC calls to deadlock as if a peer connected, but didn’t respond with an init msg, then we’d be sitting there waiting for them to respond. With this commit, we’ll now time out, kill the connection and then possible attempt to re-connect if the connection was persistent.
This commit is contained in:
2 files changed
+23
-6
No files matched your search
Reference in new issue
Block a user