From f966581fd09873c7110e0dd9be93c828972889f2 Mon Sep 17 00:00:00 2001 From: ruanshudong Date: Fri, 27 Oct 2023 15:17:29 +0800 Subject: [PATCH] fix change tarsnode start server timeout default time(60000) --- NodeServer/CommandLoad.cpp | 4 ++-- NodeServer/ServerObject.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NodeServer/CommandLoad.cpp b/NodeServer/CommandLoad.cpp index 883bc3d..57590e5 100644 --- a/NodeServer/CommandLoad.cpp +++ b/NodeServer/CommandLoad.cpp @@ -535,8 +535,8 @@ int CommandLoad::updateConfigFile(string& sResult) _serverObjectPtr->setMainClass(tConf.get("/tars/application/server", "")); _serverObjectPtr->setClassPath(tConf.get("/tars/application/server", "")); _serverObjectPtr->setEnv(tConf.get("/tars/application/server", "")); - _serverObjectPtr->setHeartTimeout(TC_Common::strto(tConf.get("/tars/application/server", ""))); - _serverObjectPtr->setActivatingTimeout(TC_Common::strto(tConf.get("/tars/application/server", ""))); + _serverObjectPtr->setHeartTimeout(TC_Common::strto(tConf.get("/tars/application/server", "45000"))); + _serverObjectPtr->setActivatingTimeout(TC_Common::strto(tConf.get("/tars/application/server", "60000"))); _serverObjectPtr->setPackageFormat(tConf.get("/tars/application/server", "tgz")); _serverObjectPtr->setVolumes(tConf.getDomainMap("/tars/application/container/volumes")); diff --git a/NodeServer/ServerObject.cpp b/NodeServer/ServerObject.cpp index 59ae076..d423c27 100644 --- a/NodeServer/ServerObject.cpp +++ b/NodeServer/ServerObject.cpp @@ -612,7 +612,7 @@ bool ServerObject::isStartTimeOut() Lock lock(*this); int64_t now = TNOWMS; - int timeout=_activatingTimeout >0 ? _activatingTimeout : 11000; + int timeout=_activatingTimeout >0 ? _activatingTimeout : 30000; if (now - _startTime >= timeout && now - _keepAliveTime >= timeout) {