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

fix central docker launch without redis

Grant Limberg преди 4 години
родител
ревизия
27ce787fbd
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      ext/central-controller-docker/main.sh
  2. 1 1
      service/OneService.cpp

+ 1 - 1
ext/central-controller-docker/main.sh

@@ -50,7 +50,7 @@ if [ "$ZT_USE_REDIS" == "true" ]; then
         }
     "
 else
-    REDIS="\"redis\": {}"
+    REDIS="\"redis\": null"
 fi
 
 mkdir -p /var/lib/zerotier-one

+ 1 - 1
service/OneService.cpp

@@ -1071,7 +1071,7 @@ public:
 			if (redis.is_object() && _rc == NULL) {
 				_rc = new RedisConfig;
 				_rc->hostname = OSUtils::jsonString(redis["hostname"],"");
-				_rc->port = redis["port"];
+				_rc->port = OSUtils::jsonInt(redis["port"],0);
 				_rc->password = OSUtils::jsonString(redis["password"],"");
 				_rc->clusterMode = OSUtils::jsonBool(redis["clusterMode"], false);
 			}