Skip to content

Commit

Permalink
http_proxy: do not check if proxy is closing on Close()
Browse files Browse the repository at this point in the history
hp.proxy.Close() can be called multiple times, it only works once.
  • Loading branch information
Choraden authored and mmatczuk committed Sep 14, 2023
1 parent 06a56b5 commit 833de33
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions http_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,6 @@ func (hp *HTTPProxy) Addr() string {

func (hp *HTTPProxy) Close() error {
err := hp.listener.Close()
if !hp.proxy.Closing() {
hp.proxy.Close()
}
hp.proxy.Close()
return err
}

0 comments on commit 833de33

Please sign in to comment.