@@ -181,7 +181,7 @@ void queueClientForReprocessing(client *c) {
181181/* Unblock a client calling the right function depending on the kind
182182 * of operation the client is blocking for. */
183183void unblockClient (client * c , int queue_for_reprocessing ) {
184- if (c -> bstate .btype == BLOCKED_DATA ) {
184+ if (c -> bstate .btype == BLOCKED_LIST || c -> bstate . btype == BLOCKED_ZSET || c -> bstate . btype == BLOCKED_STREAM ) {
185185 unblockClientWaitingData (c );
186186 } else if (c -> bstate .btype == BLOCKED_WAIT ) {
187187 unblockClientWaitingReplicas (c );
@@ -225,7 +225,7 @@ void unblockClient(client *c, int queue_for_reprocessing) {
225225 * send it a reply of some kind. After this function is called,
226226 * unblockClient() will be called with the same client as argument. */
227227void replyToBlockedClientTimedOut (client * c ) {
228- if (c -> bstate .btype == BLOCKED_DATA ) {
228+ if (c -> bstate .btype == BLOCKED_LIST || c -> bstate . btype == BLOCKED_ZSET || c -> bstate . btype == BLOCKED_STREAM ) {
229229 addReplyNullArray (c );
230230 updateStatsOnUnblock (c , 0 , 0 , 0 );
231231 } else if (c -> bstate .btype == BLOCKED_WAIT ) {
@@ -434,10 +434,10 @@ static void unblockClientWaitingData(client *c) {
434434
435435static blocking_type getBlockedTypeByType (int type ) {
436436 switch (type ) {
437- case OBJ_LIST : return BLOCKED_DATA ;
438- case OBJ_ZSET : return BLOCKED_DATA ;
439- case OBJ_STREAM : return BLOCKED_DATA ;
437+ case OBJ_LIST : return BLOCKED_LIST ;
438+ case OBJ_ZSET : return BLOCKED_ZSET ;
440439 case OBJ_MODULE : return BLOCKED_MODULE ;
440+ case OBJ_STREAM : return BLOCKED_STREAM ;
441441 default : return BLOCKED_NONE ;
442442 }
443443}
@@ -625,7 +625,8 @@ static void unblockClientOnKey(client *c, robj *key) {
625625
626626 /* Only in case of blocking API calls, we might be blocked on several keys.
627627 however we should force unblock the entire blocking keys */
628- serverAssert (c -> bstate .btype == BLOCKED_DATA );
628+ serverAssert (c -> bstate .btype == BLOCKED_STREAM || c -> bstate .btype == BLOCKED_LIST ||
629+ c -> bstate .btype == BLOCKED_ZSET );
629630
630631 /* We need to unblock the client before calling processCommandAndResetClient
631632 * because it checks the CLIENT_BLOCKED flag */
0 commit comments