From fa6cd4892d2841f7237a125f4c2ae96f9f49f520 Mon Sep 17 00:00:00 2001
From: miyanhui <dennismi1024@gmail.com>
Date: 星期五, 15 二月 2019 15:49:20 +0800
Subject: [PATCH] 解决新的方式程序崩溃的问题

---
 QiaoJiaSystem/YoloServer/main.cpp |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/QiaoJiaSystem/YoloServer/main.cpp b/QiaoJiaSystem/YoloServer/main.cpp
index 438ff3e..238a50f 100644
--- a/QiaoJiaSystem/YoloServer/main.cpp
+++ b/QiaoJiaSystem/YoloServer/main.cpp
@@ -7,6 +7,7 @@
 #include <basic/util/app/AppConfig.h>
 
 int main(int argc, char **argv) {
+    std::cout<<__DATE__<<" "<<__TIME__<<std::endl;
     SAVE_APP_ARGS;
     ENABLEGLOG(GET_STR_CONFIG("logPath").c_str());
     auto ich = Ice::initialize(argc, argv);
@@ -24,14 +25,14 @@
 //    adapter->activate();
 //    ich->waitForShutdown();
 
-    if (argc < 3) {
-        ERR("argc error");
-        return -1;
-    }
+//    if (argc < 3) {
+//        ERR("argc error");
+//        return -1;
+//    }
 
-    int gpuindex = atoi(argv[1]);
-    int poolNum = atoi(argv[2]);
-    int portNum = atoi(argv[3]);
+    int gpuindex = 0;
+    int poolNum = 1;
+    int portNum = 10003;
 
     appPref.setIntData("gpu.index", gpuindex);
     appPref.setFloatData("thresh.detect", 0.7);
@@ -39,8 +40,8 @@
 
     IceRpcServer<YoloDetectServerI> server("yoloServer", portNum, "tcp");
     server.setMessageSizeMax(1024 * 1024 * 50);
-    server.setPoolInitSize(poolNum);
-    server.setPoolMaxSize(poolNum);
+    server.setPoolInitSize(1);
+    server.setPoolMaxSize(1);
     server.runWaitShutDown();
     return 0;
 }

--
Gitblit v1.8.0