conflux-rust icon indicating copy to clipboard operation
conflux-rust copied to clipboard

Using peer_id to keep track of requests can introduce inconsistent behavior.

Open peilun-conflux opened this issue 7 years ago • 1 comments

When peers are disconnected, its peer_id may be reused by other connections later. Now we memorize the peer_id of in-flight requests in the protocol handler and process them if timeout. Reused peer_id can introduce unexpected behavior in match_request. With issue #35, this bug may be trigger quite commonly now. One solution is to keep track of in-flight requests in every peer's state, and this can be fixed together with cleverer synchronization of headers/blocks because we also need more state there.

peilun-conflux avatar Apr 07 '19 15:04 peilun-conflux

This is not going to cause serious problem. Timeout requests of disconnected sessions may cause log with wrong "Unexpected Response" message which has been fixed.

sparkmiw avatar Apr 15 '19 16:04 sparkmiw