fix: missing close on error for keepAlive connections (#13109)

Add missing close when error is reported
before body is done.
This commit is contained in:
Klaus Post 2021-08-30 17:46:46 +02:00 committed by GitHub
parent 514b2d6f12
commit 76b3d3c559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -769,6 +769,7 @@ func keepHTTPReqResponseAlive(w http.ResponseWriter, r *http.Request) (resp func
} else { } else {
w.Write([]byte{0}) w.Write([]byte{0})
} }
close(doneCh)
return return
} }
defer close(doneCh) defer close(doneCh)