(ixsnake) uses an std::thread to handle redis subscriptions (2 unittest still failing)

This commit is contained in:
Benjamin Sergeant
2020-07-24 18:12:07 -07:00
parent 45a40c8640
commit 9a47ec1217
7 changed files with 98 additions and 54 deletions

View File

@ -10,10 +10,18 @@
#include <ixwebsocket/IXNetSystem.h>
#include <spdlog/spdlog.h>
#ifndef _WIN32
#include <signal.h>
#endif
int main(int argc, char* argv[])
{
ix::initNetSystem();
#ifndef _WIN32
signal(SIGPIPE, SIG_IGN);
#endif
ix::CoreLogger::LogFunc logFunc = [](const char* msg, ix::LogLevel level) {
switch (level)
{
@ -49,6 +57,7 @@ int main(int argc, char* argv[])
}
};
ix::CoreLogger::setLogFunction(logFunc);
spdlog::set_level(spdlog::level::debug);
int result = Catch::Session().run(argc, argv);