This commit is contained in:
Ozan Tezcan 2026-04-13 06:09:26 +03:00
parent 2ae97177fd
commit 4eeadaece8

View file

@ -466,8 +466,14 @@ typedef struct replBufWriter {
static void replBufWriterBegin(replBufWriter *wr) {
listNode *ln = listLast(server.repl_buffer_blocks);
replBufBlock *tail = ln ? listNodeValue(ln) : NULL;
wr->start_node = ln;
wr->start_pos = tail ? tail->used : 0;
if (tail && tail->used < tail->size) {
wr->start_node = ln;
wr->start_pos = tail->used;
} else {
wr->start_node = NULL;
wr->start_pos = 0;
}
wr->total_len = 0;
wr->tail = tail;
}