Skip to content

Report RPC Errors to the application on peer disconnections#5658

Closed
AgeManning wants to merge 4 commits intosigp:unstablefrom
AgeManning:rpc-error-on-disconnect
Closed

Report RPC Errors to the application on peer disconnections#5658
AgeManning wants to merge 4 commits intosigp:unstablefrom
AgeManning:rpc-error-on-disconnect

Conversation

@AgeManning
Copy link
Member

As we are overhaling some internal RPC infrastructure, a desired feature is to report peer disconnects on RPC requests.

This PR should report an RPCError(Disconnected) if a connection is terminated whilst an RPC request is underway.

Copy link
Collaborator

@dapplion dapplion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! expect usage is ok

Copy link
Member

@pawanjay176 pawanjay176 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

debug!(log, "Sender received a response");
}
NetworkEvent::RPCFailed { id, peer_id, error } => {
panic!("got RPCError");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should return true from the future if we entered this branch and only pass the test in that case.

@dapplion
Copy link
Collaborator

dapplion commented May 2, 2024

@dapplion dapplion closed this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants