mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
close ptyout file
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user