Files
flvx/plans/004-forward-explicit-bind-self-occupy-release.md
sagitchu 7efb49bdab fix: handle forward service rebind on self-occupied port
When UpdateService encounters bind address conflicts (port already in use),
the handler now automatically deletes existing forward services and retries
the AddService operation. This resolves issues where a forward's own stale
listener prevents the update.

- Add isBindAddressInUseError() to detect port bind conflicts
- Add rebindForwardServiceOnSelfOccupiedPort() for automatic cleanup and retry
- Add HasOtherForwardOnNodePort() repository method to verify port ownership
- Add unit tests for bind conflict detection
2026-03-03 20:53:55 +08:00

728 B

004 Forward Explicit Bind Self-Occupy Release

Checklist

  • Confirm current forward edit/save failure path and lock strategy: explicit bind always stays explicit.
  • Add repository query to detect whether a node+port is occupied by other forwards (excluding current forward).
  • Enhance forward service sync to treat address-in-use as a recoverable case when only self occupies the port.
  • On self-occupy conflict, proactively delete current forward services on target node and retry AddService.
  • Keep hard failure when the same node+port is occupied by other forwards.
  • Add focused unit tests for new error classification helpers.
  • Run focused backend tests for touched handler/repo packages.