mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-04-25 11:02:12 +00:00
A user of libp2p-request-response is guaranteed to receive an additional event after receiving a request via `RequestResponseEvent::Message`. After receiving the request: - If the user responds in time and the connection is still alive, the user can expect a `ResponseSent`. - If the user drops the response channel, the user can expect an `InboundFailure::ResponseOmission`. - If the user does not respond in time, the user can expect an `InboundFailure::Timeout`. Thus far the user did not receive an event when the connection to the peer closes. With this commit: - If the connection to the peer closes before the users calls `send_response` or after the user calls `send_response` but before the response can be send on the network, the user can expect an `InboundFailure::ConnectionClosed`.