websocket: Do not serialize accepts.
(Problem diagnosed by @rthellend)
Prior to this change, when using the "wsh" protocol, the "Accept" would
wait on reading a magic byte off the TCP connection. This meant that
when presented with a TCP connection (for example, from a portscan) that
does not write any data to the connection - ALL other connections would
be stuck behind it and not be processed.
This behavior is a suspect for recent mounttable service outages:
See veyron/release-issues#1852
See veyron/release-issues#1760
While at it, this change also ensures that errors from the
underlying net.Listener.Accept get propagated - in particular,
the "temporary" nature of some of them. Doing so helps with
SHA: 1cd32ebd1c6575bd70359fba35c4f6c13f26983b
(https://vanadium-review.googlesource.com/#/c/9835/)
Added a unittest that fails (with the timeout error) without
the corresponding changes to listener.go
Change-Id: I55fdc82047c89e1ee6a79fbf429b13aa664054c4
2 files changed