From 0083f2d4816dec6fe40b6244d66c711b0c1abb5b Mon Sep 17 00:00:00 2001 From: yzy613 Date: Sat, 1 Jan 2022 22:47:28 +0800 Subject: [PATCH] v1.4.4 a: fix bug when server is not root server --- internal/server/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/server/server.go b/internal/server/server.go index 68b0b6c..05109b1 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -19,9 +19,9 @@ func (conf ServerConf) GetLatestVersion() (str string) { return "N/A (请检查网络连接)" } defer func(Body io.ReadCloser) { - t := Body.Close().Error() - if t != "" { - str = t + err = Body.Close() + if err != nil { + str = err.Error() } }(res.Body) recvJson, err := ioutil.ReadAll(res.Body)