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:
parent
d42094ea72
commit
feb25bf276
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue