Преглед изворни кода

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