Skip to content

fix(request-response): don't fail requests on DialPeerConditionFalse#6000

Merged
mergify[bot] merged 5 commits intolibp2p:masterfrom
elenaf9:fix/request-response/dial-condition-failure
Apr 29, 2025
Merged

fix(request-response): don't fail requests on DialPeerConditionFalse#6000
mergify[bot] merged 5 commits intolibp2p:masterfrom
elenaf9:fix/request-response/dial-condition-failure

Conversation

@elenaf9
Copy link
Member

@elenaf9 elenaf9 commented Apr 21, 2025

Description

If a dial fails because of an unmet peer condition, it just means that there is already an ongoing dial.
We shouldn't fail the pending outbound requests to the peer in that case.

Fixes #5996.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@elenaf9 elenaf9 changed the title fix(request-response): don't fail outbound request on DialError::DialPeerConditionFalse fix(request-response): don't fail requests on DialPeerConditionFalse Apr 21, 2025
Copy link
Member

@dariusc93 dariusc93 left a comment

Choose a reason for hiding this comment

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

LGTM thanks

Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

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

Thanks Elena LGTM

@jxs jxs added the send-it label Apr 29, 2025
@mergify mergify bot merged commit 155ccfe into libp2p:master Apr 29, 2025
71 checks passed
MatthiasvB pushed a commit to MatthiasvB/rust-libp2p that referenced this pull request May 5, 2025
If a dial fails because of an unmet peer condition, it just means that there is already an ongoing dial.
We shouldn't fail the pending outbound requests to the peer in that case.

Fixes libp2p#5996.

Pull-Request: libp2p#6000.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

request_response (at least!) cancels its own dials due to race condition

3 participants