mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
cmd/cli: close log reader after reading
This commit is contained in:
committed by
Cuong Manh Le
parent
6fd3d1788a
commit
c53a0ca1c4
@@ -221,6 +221,7 @@ func (p *prog) registerControlServerHandler() {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
defer lr.r.Close()
|
||||
if lr.size == 0 {
|
||||
w.WriteHeader(http.StatusMovedPermanently)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user