feat: move dumping to separate thread
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <random>
|
||||
#include <vector>
|
||||
#include <regex>
|
||||
#include <thread>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
@@ -102,6 +103,7 @@ bool Spoofer::parseCatalog(std::string data)
|
||||
return false;
|
||||
}
|
||||
|
||||
std::thread t([&data]() {
|
||||
std::string outPath = utils::getExePath() + "catalog.json";
|
||||
std::ofstream file(outPath);
|
||||
if (file.is_open())
|
||||
@@ -112,6 +114,7 @@ bool Spoofer::parseCatalog(std::string data)
|
||||
}
|
||||
else
|
||||
Log::error("Unable to write to catalog.json");
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user