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.
This commit is contained in:
parent
6e217dfcb0
commit
40e4f39181
6 changed files with 113 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue