FAQ
*** Submitted as
http://code.google.com/p/go/source/detail?r=9b31d3f52fff ***

net: protocol specific listen functions return a proper local socket
address

When a nil listener address is passed to some protocol specific
listen function, it will create an unnamed, unbound socket because
of the nil listener address. Other listener functions may return
invalid address error.

This CL allows to pass a nil listener address to all protocol
specific listen functions to fix above inconsistency. Also make it
possible to return a proper local socket address in case of a nil
listner address.

Fixes issue 4190.
Fixes issue 3847.

R=rsc, iant
CC=golang-dev
http://codereview.appspot.com/6525048



http://codereview.appspot.com/6525048/diff/26001/src/pkg/net/tcp_test.go
File src/pkg/net/tcp_test.go (right):

http://codereview.appspot.com/6525048/diff/26001/src/pkg/net/tcp_test.go#newcode143
src/pkg/net/tcp_test.go:143: if la == nil {
On 2012/11/12 21:07:46, rsc wrote:
the ,ok below will handle nil correctly so you could delete this and use a
instead of la in the print below.
Done.

http://codereview.appspot.com/6525048/diff/26001/src/pkg/net/udp_test.go
File src/pkg/net/udp_test.go (right):

http://codereview.appspot.com/6525048/diff/26001/src/pkg/net/udp_test.go#newcode114
src/pkg/net/udp_test.go:114: if la == nil {
On 2012/11/12 21:07:46, rsc wrote:
same
Done.

http://codereview.appspot.com/6525048/

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 13, '12 at 3:56a
activeNov 13, '12 at 3:56a
posts1
users1
websitegolang.org

1 user in discussion

Mikioh Mikioh: 1 post

People

Translate

site design / logo © 2021 Grokbase