summaryrefslogtreecommitdiff
path: root/node/Network.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-10-21 11:15:47 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-10-21 11:15:47 -0400
commit40e4f39181519a7eade4954f9ecb92b84ffb4866 (patch)
treef6fc14e5e1453def68bf984e79bfa37e1436d697 /node/Network.cpp
parent6e217dfcb01c923e54dd172d0dfca68ab8566bdd (diff)
downloadinfinitytier-40e4f39181519a7eade4954f9ecb92b84ffb4866.tar.gz
infinitytier-40e4f39181519a7eade4954f9ecb92b84ffb4866.zip
Peers are now dumped on shutdown in a persistence cache and reloaded on startup, which is good enough for clients right now. Supernodes will get something else for long-term authoritative identity caching.
Diffstat (limited to 'node/Network.cpp')
-rw-r--r--node/Network.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/node/Network.cpp b/node/Network.cpp
index 991842e4..acc2588d 100644
--- a/node/Network.cpp
+++ b/node/Network.cpp
@@ -37,7 +37,7 @@
#include "Packet.hpp"
#include "Buffer.hpp"
-#define ZT_NETWORK_CERT_WRITE_BUF_SIZE 524288
+#define ZT_NETWORK_CERT_WRITE_BUF_SIZE 131072
namespace ZeroTier {
@@ -324,6 +324,7 @@ void Network::_dumpMulticastCerts()
if (!mcdb)
return;
if (fwrite("ZTMCD0",6,1,mcdb) != 1) {
+ fclose(mcdb);
Utils::rm(mcdbPath);
return;
}