From 25686cc55b9df51b4606fcd2d94f674f80b1b25a Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Mon, 21 Jun 2021 17:03:46 +0800 Subject: [PATCH] [TD-4787]: reconnect arbitrator if link broken --- src/sync/src/syncMain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sync/src/syncMain.c b/src/sync/src/syncMain.c index d6b81cdf36..821d526d5e 100644 --- a/src/sync/src/syncMain.c +++ b/src/sync/src/syncMain.c @@ -869,7 +869,7 @@ static void syncRestartPeer(SSyncPeer *pPeer) { sDebug("%s, peer conn is restart and set sstatus:%s", pPeer->id, syncStatus[pPeer->sstatus]); int32_t ret = strcmp(pPeer->fqdn, tsNodeFqdn); - if (ret > 0 || (ret == 0 && pPeer->port > tsSyncPort)) { + if (pPeer->nodeId == 0 || ret > 0 || (ret == 0 && pPeer->port > tsSyncPort)) { sDebug("%s, check peer connection in 1000 ms", pPeer->id); taosTmrReset(syncCheckPeerConnection, SYNC_CHECK_INTERVAL, (void *)pPeer->rid, tsSyncTmrCtrl, &pPeer->timer); } -- GitLab