Skip to content

refactor: remove dead connect_dual_stack and try_connect_family methods#36

Merged
mickvandijke merged 1 commit into
mainfrom
refactor/remove-dead-dual-stack-methods
Apr 4, 2026
Merged

refactor: remove dead connect_dual_stack and try_connect_family methods#36
mickvandijke merged 1 commit into
mainfrom
refactor/remove-dead-dual-stack-methods

Conversation

@mickvandijke
Copy link
Copy Markdown
Collaborator

@mickvandijke mickvandijke commented Apr 4, 2026

Summary

  • Remove unused connect_dual_stack and try_connect_family methods from P2pEndpoint
  • Remove now-unused IpAddr import from p2p_endpoint.rs
  • These methods were dead code — dual-stack connectivity is handled elsewhere in the connection establishment flow

Test plan

  • cargo check --all-targets passes
  • cargo nextest run passes (no tests referenced these methods)

🤖 Generated with Claude Code

Greptile Summary

This PR removes two dead code methods — connect_dual_stack and try_connect_family — from P2pEndpoint, along with the now-unused IpAddr import. A full-repo search confirms no callers existed anywhere in the codebase; dual-stack connectivity is already handled by connect_with_fallback.

Confidence Score: 5/5

Safe to merge — pure dead-code removal with no remaining references and no behavioral change.

All changes are removal of unreferenced methods and an unused import. A full-repo grep confirms zero callers exist, so there is no risk of regression.

No files require special attention.

Important Files Changed

Filename Overview
src/p2p_endpoint.rs Removes dead connect_dual_stack and try_connect_family methods and the unused IpAddr import; no remaining references found anywhere in the repo.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[connect_with_fallback] --> B[Direct IPv4]
    A --> C[Direct IPv6]
    A --> D[Hole-Punch]
    A --> E[Relay]
    F[connect_dual_stack - REMOVED] -.->|was dead code| A
    G[try_connect_family - REMOVED] -.->|was dead code| F
Loading

Reviews (1): Last reviewed commit: "refactor: remove dead connect_dual_stack..." | Re-trigger Greptile

Superseded by the Happy Eyeballs (RFC 8305) implementation which races
all direct addresses with a 250ms stagger instead of sequential per-family
attempts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2026

Benchmark Results

Performance Comparison

Benchmark Baseline Current Change Status

Summary

Configuration

  • Regression threshold: >10% slower
  • Improvement threshold: >10% faster
  • Measurements: Mean execution time

@mickvandijke mickvandijke merged commit 58d886b into main Apr 4, 2026
44 of 45 checks passed
@jacderida jacderida mentioned this pull request Apr 14, 2026
2 tasks
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.

1 participant