Skip to content

Commit b9c5aa5

Browse files
Fixed closing done channel
1 parent b27dd47 commit b9c5aa5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gohpts.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ func (p *proxyApp) handleForward(w http.ResponseWriter, r *http.Request) {
214214
n, err := io.Copy(w, resp.Body)
215215
if err != nil {
216216
p.logger.Error().Err(err).Msgf("Error during Copy() %s: %s", r.URL.String(), err)
217+
done <- struct{}{}
218+
close(done)
217219
return
218220
}
219221
var written string

0 commit comments

Comments
 (0)