Skip to content

affected/package: http server shut down #50752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hyahm opened this issue Jan 22, 2022 · 1 comment
Closed

affected/package: http server shut down #50752

hyahm opened this issue Jan 22, 2022 · 1 comment

Comments

@hyahm
Copy link

hyahm commented Jan 22, 2022

What version of Go are you using (go version)?

$ go version
go version go1.17 windows/amd64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\cande\AppData\Local\go-build
set GOENV=C:\Users\cande\AppData\Roaming\go\env  
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\cande\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\cande\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\work\k8s_proxy\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\cande\AppData\Local\Temp\go-build4262958880=/tmp/go-build 
-gno-record-gcc-switches

What did you do?

When the client sends a request to upload a file, but the server does not handle it, the HTTP service of the server will be shut down

http server code

package main

import (
	"log"
	"net/http"
)

func main() {
	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		w.Write([]byte("ok"))
	})
	log.Fatal(http.ListenAndServe(":9000", nil))
}

use postman
image

output

PS C:\work\k8s_proxy> go run .\main.go
2022/01/22 10:46:18 http: Server closed
exit status 1
@hyahm hyahm changed the title affected/package: http affected/package: http server shut down Jan 22, 2022
@hyahm
Copy link
Author

hyahm commented Jan 22, 2022

Update to 1.17.6 is good

@hyahm hyahm closed this as completed Jan 22, 2022
@golang golang locked and limited conversation to collaborators Jan 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants