소스 검색

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