瀏覽代碼

fix: out of sync when refresh connection key

Yeuoly 8 月之前
父節點
當前提交
687187091d
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      internal/core/plugin_manager/remote_manager/connection_key.go

+ 6 - 0
internal/core/plugin_manager/remote_manager/connection_key.go

@@ -92,6 +92,12 @@ func GetConnectionKey(info ConnectionInfo) (string, error) {
 		if err != nil {
 			log.Error("failed to update connection key expire time: %s", err.Error())
 		}
+
+		// update expire time for key
+		_, err = cache.Expire(strings.Join([]string{CONNECTION_KEY_MANAGER_KEY2ID_PREFIX, key.Key}, ":"), CONNECTION_KEY_EXPIRE_TIME)
+		if err != nil {
+			log.Error("failed to update connection key expire time: %s", err.Error())
+		}
 	}
 
 	return key.Key, nil