summaryrefslogtreecommitdiff
path: root/examples/cpp/earthtest.cpp
diff options
context:
space:
mode:
authorJoseph Henry <[email protected]>2020-10-21 14:26:29 -0700
committerJoseph Henry <[email protected]>2020-10-21 14:26:29 -0700
commitb021e820781615486348a973b5129f24cb82a37b (patch)
treec81854e327ad5c2cdfb6a7136bfc596593e9cc67 /examples/cpp/earthtest.cpp
parentaf26d56097c12859df79f0e6e8e7b808e61dc126 (diff)
Fix zts_allow_*_caching() bug that prevents user from properly setting value before node startup
Diffstat (limited to 'examples/cpp/earthtest.cpp')
-rw-r--r--examples/cpp/earthtest.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/cpp/earthtest.cpp b/examples/cpp/earthtest.cpp
index 89ee426..a0275c8 100644
--- a/examples/cpp/earthtest.cpp
+++ b/examples/cpp/earthtest.cpp
@@ -181,7 +181,13 @@ int main(int argc, char **argv)
int ztServicePort = atoi(argv[2]); // Port ZT uses to send encrypted UDP packets to peers (try something like 9994)
int err = ZTS_ERR_OK;
- zts_allow_network_caching(false);
+
+ // If disabled: (network) details will NOT be written to or read from (networks.d/). It may take slightly longer to start the node
+ zts_allow_network_caching(1);
+ // If disabled: (peer) details will NOT be written to or read from (peers.d/). It may take slightly longer to contact a remote peer
+ zts_allow_peer_caching(1);
+ // If disabled: Settings will NOT be read from local.conf
+ zts_allow_local_conf(1);
if((err = zts_start(argv[1], &myZeroTierEventCallback, ztServicePort)) != ZTS_ERR_OK) {
printf("Unable to start service, error = %d. Exiting.\n", err);