]> Cypherpunks repositories - gostls13.git/commit
net: fix accept/connect deadline handling
authorDmitriy Vyukov <dvyukov@google.com>
Thu, 7 Mar 2013 13:03:40 +0000 (17:03 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Thu, 7 Mar 2013 13:03:40 +0000 (17:03 +0400)
commit0f136f2c057459999f93da2d588325e192160b39
treef16ec527d0ed06c1f16842511f50fc8b4ced7106
parent48fa4a10fbbc235f334a0a2d34f188799b95a3ae
net: fix accept/connect deadline handling
Ensure that accept/connect respect deadline,
even if the operation can be executed w/o blocking.
Note this changes external behavior, but it makes
it consistent with read/write.
Factor out deadline check into pollServer.PrepareRead/Write,
in preparation for edge triggered pollServer.
Ensure that pollServer.WaitRead/Write are not called concurrently
by adding rio/wio locks around connect/accept.

R=golang-dev, mikioh.mikioh, bradfitz, iant
CC=golang-dev
https://golang.org/cl/7436048
src/pkg/net/fd_unix.go
src/pkg/net/timeout_test.go