fix: set cursor properly in syncSnapBufferRecv

This commit is contained in:
Benguang Zhao 2023-11-03 10:09:07 +08:00
parent ce4fb52926
commit 456c8d23f3
1 changed files with 1 additions and 1 deletions

View File

@ -874,7 +874,7 @@ static int32_t syncSnapBufferRecv(SSyncSnapshotReceiver *pReceiver, SyncSnapshot
}
for (int64_t seq = pRcvBuf->cursor + 1; seq < pRcvBuf->end; ++seq) {
if (pRcvBuf->entries[seq]) {
if (pRcvBuf->entries[seq % pRcvBuf->size]) {
pRcvBuf->cursor = seq;
} else {
break;