提交 a228d5ec 编写于 作者: M Minghao Li

fix(sync): break when pState is NULL

上级 2c33026b
...@@ -336,7 +336,9 @@ char* syncNodePeerState2Str(const SSyncNode* pSyncNode) { ...@@ -336,7 +336,9 @@ char* syncNodePeerState2Str(const SSyncNode* pSyncNode) {
for (int32_t i = 0; i < pSyncNode->replicaNum; ++i) { for (int32_t i = 0; i < pSyncNode->replicaNum; ++i) {
SPeerState* pState = syncNodeGetPeerState((SSyncNode*)pSyncNode, &(pSyncNode->replicasId[i])); SPeerState* pState = syncNodeGetPeerState((SSyncNode*)pSyncNode, &(pSyncNode->replicasId[i]));
ASSERT(pState != NULL); if (pState == NULL) {
break;
}
p = pStr + useLen; p = pStr + useLen;
use = snprintf(p, leftLen, "%d:%" PRId64 " ,%" PRId64, i, pState->lastSendIndex, pState->lastSendTime); use = snprintf(p, leftLen, "%d:%" PRId64 " ,%" PRId64, i, pState->lastSendIndex, pState->lastSendTime);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册