Skip to content

Commit d7bedc3

Browse files
committed
Fix proxy crash
1 parent aa2536d commit d7bedc3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

utils/utils.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,7 @@ func HtbRequest(method string, urlParam string, proxyURL string, jsonData []byte
190190
log.Fatalln(err)
191191
}
192192
defer resp.Body.Close()
193-
body, err := io.ReadAll(resp.Body)
194-
if err != nil {
195-
log.Fatal(err)
196-
}
193+
body, _ := io.ReadAll(resp.Body)
197194
resp.Body = io.NopCloser(bytes.NewReader(body))
198195
var i interface{}
199196
if json.Unmarshal(body, &i) != nil {

0 commit comments

Comments
 (0)