Skip to content

Commit 28d62a7

Browse files
mynktlpawanpraka1
authored andcommitted
- Avoid iterating through a replica's blocked_queue if the (#78)
next command in the blocked_queue is in a blocked state. Signed-off-by: mayank <[email protected]>
1 parent 3510fee commit 28d62a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/data_conn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ unblock_cmds(replica_t *r)
148148
cmd_blocked = false;
149149
CHECK_BLOCKAGE_IN_Q(&r->readyq, next);
150150
if (cmd_blocked == true)
151-
continue;
151+
break;
152152
CHECK_BLOCKAGE_IN_Q(&r->waitq, next);
153153
if (cmd_blocked == true)
154-
continue;
154+
break;
155155
TAILQ_REMOVE(&r->blockedq, cmd, next);
156156
TAILQ_INSERT_TAIL(&r->readyq, cmd, next);
157157
unblocked = true;

0 commit comments

Comments
 (0)