]> Cypherpunks repositories - gostls13.git/commit
net: fix non-blocking connect handling on dragonfly
authorJoel Sing <jsing@google.com>
Wed, 5 Mar 2014 13:07:16 +0000 (00:07 +1100)
committerJoel Sing <jsing@google.com>
Wed, 5 Mar 2014 13:07:16 +0000 (00:07 +1100)
commit734d4637c5925826904ffe7406cd411568928cb4
tree345815bc0b180a18f6a884db0214ddefb0c0cfbe
parent9a7cd11bc8f1763710a18bd90e9db00f8281d69b
net: fix non-blocking connect handling on dragonfly

Performing multiple connect system calls on a non-blocking socket
under DragonFly BSD does not necessarily result in errors from earlier
connect calls being returned, particularly if we are connecting to
localhost. Instead, once netpoll tells us that the socket is ready,
get the SO_ERROR socket option to see if the connection succeeded
or failed.

Fixes #7474

LGTM=mikioh.mikioh
R=mikioh.mikioh
CC=golang-codereviews
https://golang.org/cl/69340044
src/pkg/net/fd_unix.go