1
0
mirror of https://github.com/golang/go synced 2024-11-22 05:24:39 -07:00

net: more selfConnect debugging: panic if ra == nil in internetSocket

TBR=dsymonds

R=dsymonds
CC=golang-dev
https://golang.org/cl/5687058
This commit is contained in:
Rob Pike 2012-02-21 15:49:08 +11:00
parent 3970d2fd58
commit c9bb042287

View File

@ -117,6 +117,10 @@ func internetSocket(net string, laddr, raddr sockaddr, sotype, proto int, mode s
if ra, oserr = raddr.sockaddr(family); oserr != nil {
goto Error
}
if ra == nil {
// TODO(r): part of selfConnect debugging
panic("ra nil when raddr non-nil")
}
}
fd, oserr = socket(net, family, sotype, proto, la, ra, toAddr)
if oserr != nil {