mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02: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)
|
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
defer lr.r.Close()
|
||||||
if lr.size == 0 {
|
if lr.size == 0 {
|
||||||
w.WriteHeader(http.StatusMovedPermanently)
|
w.WriteHeader(http.StatusMovedPermanently)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user