mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Streams: fix handleClientsBlockedOnKeys() access to invalid ID.
This commit is contained in:
parent
6468cb2e82
commit
c128190026
@ -311,9 +311,12 @@ void handleClientsBlockedOnKeys(void) {
|
|||||||
(s->last_id.ms == gt->ms &&
|
(s->last_id.ms == gt->ms &&
|
||||||
s->last_id.seq > gt->seq))
|
s->last_id.seq > gt->seq))
|
||||||
{
|
{
|
||||||
unblockClient(receiver);
|
|
||||||
streamID start = *gt;
|
streamID start = *gt;
|
||||||
start.seq++; /* Can't overflow, it's an uint64_t */
|
start.seq++; /* Can't overflow, it's an uint64_t */
|
||||||
|
/* Note that after we unblock the client, 'gt'
|
||||||
|
* is no longer valid, so we must do it after
|
||||||
|
* we copied the ID into the 'start' variable. */
|
||||||
|
unblockClient(receiver);
|
||||||
|
|
||||||
/* Emit the two elements sub-array consisting of
|
/* Emit the two elements sub-array consisting of
|
||||||
* the name of the stream and the data we
|
* the name of the stream and the data we
|
||||||
|
Loading…
x
Reference in New Issue
Block a user