]> git.stg.codes - stg.git/commitdiff
Timeout fixed, proto starting and stopping added
authorMaxim Mamontov <faust@gts.dp.ua>
Wed, 11 May 2011 11:21:48 +0000 (14:21 +0300)
committerMaxim Mamontov <faust@gts.dp.ua>
Wed, 11 May 2011 11:21:48 +0000 (14:21 +0300)
projects/sgauthstress/main.cpp

index 21df6d74f9ea4c7135afc5d6aaaae2301d2f5cc2..c7e69c4a962ce8fed23f3eb7e0c41d57338f0fa2 100644 (file)
@@ -98,7 +98,13 @@ SetSignalHandlers();
 PROTO proto(settings.GetServerName(),
             settings.GetServerPort(),
             settings.GetLocalPort(),
 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())
 
 STORE_LOADER storeLoader(settings.GetModulesPath(), settings.GetStoreModuleSettings());
 if (storeLoader.Load())
@@ -143,6 +149,8 @@ while (running)
     usleep(200000);
     }
 
     usleep(200000);
     }
 
+proto.Stop();
+
 storeLoader.Unload();
 
 return 0;
 storeLoader.Unload();
 
 return 0;