🎨 改进网络超时报错提示

This commit is contained in:
Liang Ding 2022-07-19 23:37:10 +08:00
parent a937434bd1
commit d4ea798b16
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -322,6 +322,8 @@ func formatErrorMsg(err error) string {
msg = Conf.Language(23) + " " + err.Error()
} else if strings.Contains(msg, "no such host") || strings.Contains(msg, "connection failed") {
msg = Conf.Language(24)
} else if strings.Contains(msg, "net/http: request canceled while waiting for connection") {
msg = Conf.Language(24)
}
msg = msg + " v" + util.Ver
return msg