X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/807369965afc3210e6bb01ff5f325cbfa27d2782..43e405c1473de38b677d9a228fea4df415037bb1:/projects/sgauthstress/main.cpp diff --git a/projects/sgauthstress/main.cpp b/projects/sgauthstress/main.cpp index f4e94b4f..c7e69c4a 100644 --- a/projects/sgauthstress/main.cpp +++ b/projects/sgauthstress/main.cpp @@ -98,7 +98,13 @@ SetSignalHandlers(); PROTO proto(settings.GetServerName(), settings.GetServerPort(), settings.GetLocalPort(), - 1); + 1000); + +if (!proto.Start()) + { + std::cerr << "Failed to start listening thread: '" << proto.GetStrError() << "'" << std::endl; + return -1; + } STORE_LOADER storeLoader(settings.GetModulesPath(), settings.GetStoreModuleSettings()); if (storeLoader.Load()) @@ -130,7 +136,8 @@ for (it = userList.begin(); it != userList.end(); ++it) *it, userConf.password, userConf.ips[0].ip - ) + ), + true ); } @@ -142,6 +149,8 @@ while (running) usleep(200000); } +proto.Stop(); + storeLoader.Unload(); return 0;