Преглед на файлове

fix config creator cache

Darien Raymond преди 9 години
родител
ревизия
67793eb3e0
променени са 3 файла, в които са добавени 15 реда и са изтрити 3 реда
  1. 5 1
      testing/scenarios/data/test_4_client.json
  2. 5 1
      testing/scenarios/data/test_4_server.json
  3. 5 1
      transport/internet/authenticator_json.go

+ 5 - 1
testing/scenarios/data/test_4_client.json

@@ -34,6 +34,10 @@
     }
   },
   "transport": {
-    "connectionReuse": true
+    "kcpSettings": {
+      "header": {
+        "type": "srtp"
+      }
+    }
   }
 }

+ 5 - 1
testing/scenarios/data/test_4_server.json

@@ -46,6 +46,10 @@
     }
   ],
   "transport": {
-    "connectionReuse": true
+    "kcpSettings": {
+      "header": {
+        "type": "srtp"
+      }
+    }
   }
 }

+ 5 - 1
transport/internet/authenticator_json.go

@@ -15,5 +15,9 @@ func CreateAuthenticatorConfig(rawConfig []byte) (string, interface{}, error) {
 }
 
 var (
-	configLoader = loader.NewJSONConfigLoader(loader.ConfigCreatorCache{}, "type", "")
+	configLoader loader.ConfigLoader
 )
+
+func init() {
+	configLoader = loader.NewJSONConfigLoader(configCache, "type", "")
+}