提交 f77f5e14 编写于 作者: 丁劲犇's avatar 丁劲犇 😸

Some problems happened.

上级 84c7fe4f
......@@ -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."));
......
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册