go: net/http/httptest: Server blocked in Close after 5 seconds, waiting for connections

1. What version of Go are you using (go version)? go version go1.6 windows/amd64

2. What operating system and processor architecture are you using (go env)? Windows 7/x64 git version 2.9.2.windows.1 mingw64 installed

set GOARCH=amd64 set GOBIN= set GOEXE=.exe set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=D:\Eigene Dateien\Coding\go set GORACE= set GOROOT=D:\go set GOTOOLDIR=D:\go\pkg\tool\windows_amd64 set GO15VENDOREXPERIMENT=1 set CC=gcc set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 set CXX=g++ set CGO_ENABLED=1

3. What did you do? Take the simple server example from https://tip.golang.org/pkg/net/http/httptest/#example_Server and run it with go run main.go (https://play.golang.org/p/k9beXK-pA-)

4. What did you expect to see? Hello Client

5. What did you see instead? Hello, client 2016/07/31 16:30:13 httptest.Server blocked in Close after 5 seconds, waiting for connections: *net.TCPConn 0xc08202c020 127.0.0.1:4401 in state idle

After 10mins i canceled execution wtih CTRL-C.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 33 (23 by maintainers)

Most upvoted comments

Please try the command “netsh winsock reset” in a admin cmd shell and reboot the computer. It fixed the very same issue for me (on a win7/x64 dell Latitude E5430 notebook), that was not reproducible on my colleagues notebooks.

Markus