Skip to content

Commit

Permalink
v1.4.4 a: fix bug when server is not root server
Browse files Browse the repository at this point in the history
  • Loading branch information
yzy613 committed Jan 1, 2022
1 parent 749150e commit 0083f2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0083f2d

Please sign in to comment.