Skip to content

Refactor duplicated bind logic in server config implementations #275

@coderabbitai

Description

@coderabbitai

Problem

The server configuration has duplicated bind logic in both the Unbound and Bound implementations. The bind() and bind_listener() methods contain similar logic across different server states, leading to code duplication and maintenance overhead.

Suggested Solution

Refactor the duplicated bind logic into a single private helper function to reduce repetition and simplify maintenance. This would centralise the binding logic and make it easier to modify in the future.

Context

Identified during code review of PR #262: #262

Issue: #275

Files Affected

  • src/server/config.rs

Related Issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions