close ptyout file

This commit is contained in:
sawka 2022-07-08 13:28:22 -07:00
parent ec6c1f5a9a
commit f8753830ff

View File

@ -435,6 +435,7 @@ func HandleGetPtyOut(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(fmt.Sprintf("cannot open file '%s': %v", pathStr, err)))
return
}
defer fd.Close()
w.WriteHeader(http.StatusOK)
io.Copy(w, fd)
}