Skip to content

Commit

Permalink
fix: fix crash when Redis is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Jun 20, 2023
1 parent b179c2f commit 14b8531
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions model/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func CacheGetTokenByKey(key string) (*Token, error) {
if err != nil {
common.SysError("Redis set token error: " + err.Error())
}
return &token, nil
}
err = json.Unmarshal([]byte(tokenObjectString), &token)
return &token, err
Expand Down Expand Up @@ -94,6 +95,7 @@ func CacheGetRandomSatisfiedChannel(group string, model string) (*Channel, error
if !common.RedisEnabled {
return GetRandomSatisfiedChannel(group, model)
}
return GetRandomSatisfiedChannel(group, model)
// TODO: implement this
return nil, nil
}

0 comments on commit 14b8531

Please sign in to comment.