Skip to content

Commit

Permalink
fix / redis.getKeysConn() returns keys without Config.Prefix otherwis…
Browse files Browse the repository at this point in the history
…e such keys passed into updateTTLConn() would get duplicate prefixes failing the ttl reset
  • Loading branch information
akiraho committed Aug 16, 2018
1 parent 89bef01 commit 62f5b5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sessions/sessiondb/redis/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func (r *Service) getKeysConn(c redis.Conn, prefix string) ([]string, error) {
if keysSliceAsBytes, ok := keysInterface[1].([]interface{}); ok {
keys := make([]string, len(keysSliceAsBytes), len(keysSliceAsBytes))
for i, k := range keysSliceAsBytes {
keys[i] = fmt.Sprintf("%s", k)
keys[i] = fmt.Sprintf("%s", k)[len(r.Config.Prefix):]
}

return keys, nil
Expand Down

0 comments on commit 62f5b5b

Please sign in to comment.