Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix nil pointer dereference caused by nil 'cs' #2440

Merged
merged 4 commits into from
Oct 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
optimize: 只配置了一个签名服务时不进行检查和切换操作
  • Loading branch information
1umine committed Sep 19, 2023
commit d4eff17fca0ccbea248e42c77eb913da8b6e9bd8
3 changes: 3 additions & 0 deletions cmd/gocq/qsign.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ func getAvaliableSignServer() (*config.SignServer, error) {
if len(base.SignServers) == 0 {
return nil, errors.New("no sign server configured")
}
if len(base.SignServers) == 1 { // 只配置了一个签名服务时不检查以及切换
return &base.SignServers[0], nil
}
maxCount := base.Account.MaxCheckCount
if maxCount == 0 {
if errn.hasOver(3) {
Expand Down
Loading