Handler: close TCP conn after Sendfile

Since we hijacked the HTTP connection, we need to close the underlying TCP
connection after calling Sendfile.
This commit is contained in:
Laurence Withers 2019-03-29 09:17:46 +00:00
parent d42094ea72
commit feb25bf276
1 changed files with 1 additions and 0 deletions

View File

@ -165,6 +165,7 @@ func (h *Handler) sendfile(w http.ResponseWriter, data *packed.FileData) {
h.copyfile(w, data)
return
}
defer tcp.Close()
rawsock, err := tcp.SyscallConn()
if err == nil {