diff --git a/ZoomPipeline_FuncSvr/cluster/zp_clusternode.cpp b/ZoomPipeline_FuncSvr/cluster/zp_clusternode.cpp index 10faa08a2c8e28075327d0cc9945fe0db85c4490..9eac3715955fbc174a6371199b764a25914f81ed 100644 --- a/ZoomPipeline_FuncSvr/cluster/zp_clusternode.cpp +++ b/ZoomPipeline_FuncSvr/cluster/zp_clusternode.cpp @@ -176,7 +176,8 @@ namespace ZP_Cluster{ { QDateTime dtm = QDateTime::currentDateTime(); qint64 usc = this->m_last_Report.secsTo(dtm); - int nThredHold = m_pTerm->heartBeatingThrd(); + int nThredHold = 12; + nThredHold = m_pTerm->heartBeatingThrdHold(); if (usc >= nThredHold) { emit evt_Message(this,tr("Client ") + QString("%1").arg((unsigned int)((quint64)this)) + tr(" is dead, kick out.")); diff --git a/ZoomPipeline_FuncSvr/cluster/zp_clusterterm.cpp b/ZoomPipeline_FuncSvr/cluster/zp_clusterterm.cpp index 4c63df68362a20576bc84ca5cd011ca6a692a47c..b24696694ccff8f1a66e04cefd503391dc02803b 100644 --- a/ZoomPipeline_FuncSvr/cluster/zp_clusterterm.cpp +++ b/ZoomPipeline_FuncSvr/cluster/zp_clusterterm.cpp @@ -16,7 +16,7 @@ namespace ZP_Cluster{ connect(m_pClusterNet,&ZPNetwork::zp_net_ThreadPool::evt_NewClientConnected, this,&zp_ClusterTerm::on_evt_NewClientConnected); //connect(m_pClusterNet,&ZPNetwork::zp_net_ThreadPool::evt_ClientEncrypted, this,&zp_ClusterTerm::on_evt_ClientEncrypted); m_nPortPublish = 0; - m_nHeartBeatingDeadThrd = 20; + m_nHeartBeatingTime = 20; } void zp_ClusterTerm::StartListen(const QHostAddress &addr, int nPort) diff --git a/ZoomPipeline_FuncSvr/cluster/zp_clusterterm.h b/ZoomPipeline_FuncSvr/cluster/zp_clusterterm.h index 6baf19348c7a8983706bf085f0cbd8a2095cfc30..58b4d856122cb76073b96b4b5776ebe73851ff87 100644 --- a/ZoomPipeline_FuncSvr/cluster/zp_clusterterm.h +++ b/ZoomPipeline_FuncSvr/cluster/zp_clusterterm.h @@ -31,15 +31,15 @@ namespace ZP_Cluster{ int publishPort(){return m_nPortPublish;} QHostAddress setPublishAddr(QHostAddress addr){return m_addrPublish = addr;} int setPublishPort(int port){return m_nPortPublish = port;} - int heartBeatingThrd() {return m_nHeartBeatingDeadThrd;} - void setHeartBeatingThrd(const int n){m_nHeartBeatingDeadThrd = n;} + int heartBeatingThrdHold() {return m_nHeartBeatingTime;} + void setHeartBeatingThrd(const int n){m_nHeartBeatingTime = n;} protected: QString m_strTermName;//the Terminal's name QHostAddress m_addrPublish; //The publish address for other terms to connect to int m_nPortPublish;//The publish port for other terms to connect to ZPNetwork::zp_net_ThreadPool * m_pClusterNet; ZPTaskEngine::zp_pipeline * m_pClusterEng; - int m_nHeartBeatingDeadThrd; + int m_nHeartBeatingTime; //Server Group Mapping protected: //This list hold dead nodes that still in task queue,avoiding crash