memory poll for RouterProfile

This commit is contained in:
orignal 2023-08-26 10:57:05 -04:00
parent 662a59d0fd
commit c112276eea
4 changed files with 6 additions and 3 deletions

View file

@ -16,6 +16,7 @@
#include "FS.h"
#include "Log.h"
#include "Timestamp.h"
#include "NetDb.hpp"
#include "Profiling.h"
namespace i2p
@ -237,7 +238,7 @@ namespace data
if (it != g_Profiles.end ())
return it->second;
}
auto profile = std::make_shared<RouterProfile> ();
auto profile = netdb.NewRouterProfile ();
profile->Load (identHash); // if possible
std::unique_lock<std::mutex> l(g_ProfilesMutex);
g_Profiles.emplace (identHash, profile);