From: Maxim Mamontov Date: Wed, 11 May 2011 11:21:48 +0000 (+0300) Subject: Timeout fixed, proto starting and stopping added X-Git-Tag: 2.407-p1~6 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/43e405c1473de38b677d9a228fea4df415037bb1?ds=inline Timeout fixed, proto starting and stopping added --- diff --git a/projects/sgauthstress/main.cpp b/projects/sgauthstress/main.cpp index 21df6d74..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()) @@ -143,6 +149,8 @@ while (running) usleep(200000); } +proto.Stop(); + storeLoader.Unload(); return 0;