Skip to content

Commit

Permalink
Fix a memory leak in Signaller.ProcessSignalQueue due to an unclosed …
Browse files Browse the repository at this point in the history
…response body (#67)
  • Loading branch information
mqmr authored Apr 6, 2021
1 parent 7fc8b94 commit 2e455bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/signaller/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ func (b *Signaller) ProcessSignalQueue() {
} else {
glog.V(5).Infof("recieved a signal response from %s: %+v", response.Request.URL.Host, response)
}

if response != nil {
if err := response.Body.Close(); err != nil {
glog.Error("error on closing response body:", err)
}
}
}
}

Expand Down

0 comments on commit 2e455bf

Please sign in to comment.