Fixed TLS init order

This commit is contained in:
SChernykh
2025-09-17 09:14:32 +02:00
parent 32e940577e
commit f141bef4b5
3 changed files with 23 additions and 3 deletions

View File

@@ -44,6 +44,10 @@
#include "randomx.h"
#endif
#ifdef WITH_TLS
#include "tls.h"
#endif
#if defined(_WIN32) && defined(_MSC_VER) && !defined(NDEBUG)
#include <DbgHelp.h>
@@ -312,6 +316,13 @@ int main(int argc, char* argv[])
grpc_init();
#endif
#ifdef WITH_TLS
if (!p2pool::ServerTls::global_init()) {
printf("ServerTls::global_init failed\n");
return 1;
}
#endif
try {
p2pool::p2pool pool(argc, argv);
result = pool.run();