Repository navigation
Conversation
Signed-off-by: jay23606 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
tkircsi
approved these changes
Nov 24, 2026
tkircsi
left a comment
Contributor
There was a problem hiding this comment.
Thanks @jay23606 for the clear writeup. 0.0.0.0 is a bind address, and dialing it works on Linux and macOS only by BSD convention. The daemon already maps an unspecified host to 127.0.0.1 before dialing itself (localDialAddress in cli/cmd/daemon/config.go), so this just brings the client default in line.
jay23606
deleted the
pr-go/2531-bug-default-client-address-0-0-0-0-8888-
branch
November 25, 2026 00:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
client.DefaultServerAddresswas0.0.0.0:8888. That is a bind address, not a dial address. Linux and macOS happen to treat a connect to0.0.0.0as loopback, but Windows fails withWSAEADDRNOTAVAIL. As a result, a Windows user who runs a local daemon and omits--server-addr,DIRECTORY_CLIENT_SERVER_ADDRESSand a context cannot connect.Change
client/config.go:DefaultServerAddressis now127.0.0.1:8888. It behaves the same on macOS and Linux and works on Windows.client/options_test.go:TestOptions_DefaultValuesnow expects127.0.0.1:8888. This is the regression test. It fails on the old value withexpected: "127.0.0.1:8888"and passes with the fix.client/README.mdanddocs/content/dir/dir-sdk-go.md: the documented default forDIRECTORY_CLIENT_SERVER_ADDRESSis updated to match.Testing
go test ./ -run TestOptions_DefaultValues -count=1inclient/: fails with the old value, passes with the fix.go vet ./inclient/: no output.go test ./... -count=1inclient/: all packages pass.The Windows connection itself was not run on a Windows host here; the fix relies on the documented
connectbehaviour for0.0.0.0.Regression test: fails on base twice (/expected: "127.0.0.1:8888"/), passes on fix twice (
cd client && go test ./ -run '^TestOptions_DefaultValues$' -count=1)Fixes #2531