fix: improve bind-conflict detection and forward cleanup reliability

- Normalize whitespace in error messages to handle collapsed variants (e.g., 'address alreadyin use')
- Delete all forward service name variants (_tcp, _udp, base) during cleanup instead of stopping after first success
- Add comprehensive test coverage for edge cases
This commit is contained in:
sagitchu
2026-03-07 17:19:28 +08:00
parent 87479c2ac1
commit 669323f926
4 changed files with 68 additions and 14 deletions
@@ -1006,7 +1006,7 @@ func TestForwardUpdateRecoversFromAddressInUseContract(t *testing.T) {
}
mu.Unlock()
if shouldFail {
return true, "listen tcp 10.42.0.9:44001: bind: address already in use"
return true, "create service 57_7_7_tcp failed: listen tcp4 0.0.0.0:46222: bind: address alreadyin use"
}
return false, ""
})