Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network-libp2p: Fix double increments and missing decrements for peer/IP counters in Connection Pool Behaviour #2991

Open
wants to merge 1 commit into
base: albatross
Choose a base branch
from

Conversation

Eligioo
Copy link
Member

@Eligioo Eligioo commented Oct 21, 2024

  • Incrementing the counters happened in both handle_pending_inbound_connection and on_connection_established.
  • Secondly due to early returns, there were scenarios where some counters wouldn't get decremented.
  • Lastly decrement the limit counters on a listen failure.

Pull request checklist

  • All tests pass. The project builds and runs.
  • I have resolved any merge conflicts.
  • I have resolved all clippy and rustfmt warnings.

@Eligioo Eligioo force-pushed the stefan/fix-connection-pool-limits branch from 7e409f9 to 3d7ac30 Compare October 21, 2024 13:10
@Eligioo Eligioo added the WIP This pull request is still work in progress label Oct 21, 2024
@Eligioo Eligioo force-pushed the stefan/fix-connection-pool-limits branch 2 times, most recently from 1ea699e to 7d8a8f5 Compare October 21, 2024 19:43
…/IP counters in Connection Behaviour

Incrementing the counters happened in both `handle_pending_inbound_connection` and `on_connection_established`.
Seconly due to early returns, there were scenarios where some counters wouldn't get decremented.
Lastly decrement the limit counters on a listen failure.
@Eligioo Eligioo force-pushed the stefan/fix-connection-pool-limits branch from 7d8a8f5 to 0bebe74 Compare October 23, 2024 15:31
@Eligioo Eligioo removed the WIP This pull request is still work in progress label Oct 23, 2024
@Eligioo Eligioo assigned jsdanielh and unassigned jsdanielh Oct 23, 2024
@Eligioo Eligioo changed the title network-libp2p: Fix double increments and missing decrements for peer/IP counters in Connection Behaviour network-libp2p: Fix double increments and missing decrements for peer/IP counters in Connection Pool Behaviour Oct 23, 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.

2 participants