feat: move dumping to separate thread

This commit is contained in:
2026-04-09 23:16:12 -03:00
parent 76d581c419
commit a1a123054f
+13 -10
View File
@@ -6,6 +6,7 @@
#include <random>
#include <vector>
#include <regex>
#include <thread>
#include <time.h>
@@ -102,16 +103,18 @@ bool Spoofer::parseCatalog(std::string data)
return false;
}
std::string outPath = utils::getExePath() + "catalog.json";
std::ofstream file(outPath);
if (file.is_open())
{
file << data;
file.close();
Log::verbose("Raw catalog saved to {}", outPath);
}
else
Log::error("Unable to write to catalog.json");
std::thread t([&data]() {
std::string outPath = utils::getExePath() + "catalog.json";
std::ofstream file(outPath);
if (file.is_open())
{
file << data;
file.close();
Log::verbose("Raw catalog saved to {}", outPath);
}
else
Log::error("Unable to write to catalog.json");
});
try
{