Skip to content

net: dial to a non-existent address doen't return an error #8276

@gopherbot

Description

@gopherbot

by coocood:

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What does 'go version' print?

go version go1.3 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

http://play.golang.org/p/PVBGNsPLN1

What happened?

returned error is nil when dial a non-exists address.

What should have happened instead?

the error should not be nil.

Please provide any additional information below.

It happens only on Go 1.3, Go 1.2 doesn't have this issue, so I compared the source
code, and found out that this was caused by a change to "connect" method in
"net/fd_unix.go" file. So I edited this method with the old version, then
recompiled Go 1.3, the issue disappeared.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions