Explorar el Código

Update redisKv.go

(cherry picked from commit cfff5200e834e0377f440ea166678284507f53cf)
Signed-off-by: Jiyong Huang <huangjy@emqx.io>
dongfangshili hace 2 años
padre
commit
7ab9721999
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      internal/pkg/store/redis/redisKv.go

+ 2 - 2
internal/pkg/store/redis/redisKv.go

@@ -1,4 +1,4 @@
-// Copyright 2021-2022 EMQ Technologies Co., Ltd.
+// Copyright 2021-2023 EMQ Technologies Co., Ltd.
 //
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // you may not use this file except in compliance with the License.
@@ -63,7 +63,7 @@ func (kv redisKvStore) Set(key string, value interface{}) error {
 	if nil != err {
 	if nil != err {
 		return err
 		return err
 	}
 	}
-	return kv.database.SetNX(kv.tableKey(key), b, 0).Err()
+	return kv.database.Set(kv.tableKey(key), b, 0).Err()
 }
 }
 
 
 func (kv redisKvStore) Get(key string, value interface{}) (bool, error) {
 func (kv redisKvStore) Get(key string, value interface{}) (bool, error) {