mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-04 23:22:16 +00:00
Currently, the `connection_keep_alive` function of identify does not compute anything but its return value is set through the handler state machine. This is hard to understand and causes surprising behaviour because at the moment, we set `KeepAlive::No` as soon as the remote has answered our identify request. Depending on what else is happening on the connection, this might close the connection before we have successfully answered the remote's identify request. To fix this, we now compute `connection_keep_alive` based on whether we are still using the connection. Related: #3844. Pull-Request: #3876.