summaryrefslogtreecommitdiff
path: root/examples/cpp/server.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/server.cpp
parentaf26d56097c12859df79f0e6e8e7b808e61dc126 (diff)
Fix zts_allow_*_caching() bug that prevents user from properly setting value before node startup
Diffstat (limited to 'examples/cpp/server.cpp')
-rw-r--r--examples/cpp/server.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/cpp/server.cpp b/examples/cpp/server.cpp
index 3588937..1684ab0 100644
--- a/examples/cpp/server.cpp
+++ b/examples/cpp/server.cpp
@@ -227,6 +227,13 @@ int main(int argc, char **argv)
int fd, accfd;
int err = ZTS_ERR_OK;
+ // 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);
exit(1);