You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use netutil.LimitListener and accept the maximum number of connections. Without closing any connections, close the listener. According to the net.Listener interface, any active Accept() calls should unblock and error. LimitListener does not do this.
mikioh
changed the title
x/net: netutil.LimitListener Accept() does not unblock when Close() is called with connection limit reached.
x/net/netutil: LimitListener Accept() does not unblock when Close() is called with connection limit reached.
Mar 20, 2018
What version of Go are you using (
go version
)?go version go1.9.2 linux/amd64
Does this issue reproduce with the latest release?
Untested, but issue is not with the runtime.
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/amistry/go-src"
GORACE=""
GOROOT="/home/amistry/go"
GOTOOLDIR="/home/amistry/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build151791535=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
What did you do?
Use netutil.LimitListener and accept the maximum number of connections. Without closing any connections, close the listener. According to the net.Listener interface, any active Accept() calls should unblock and error. LimitListener does not do this.
https://play.golang.org/p/6PL6suf4CUP
What did you expect to see?
Accept() unblocks with an error.
What did you see instead?
Accept() stays blocked.
Bug and solution are trivial. I'll send a CL soon.
The text was updated successfully, but these errors were encountered: