File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -301,9 +301,11 @@ int pubsubPublishMessage(robj *channel, robj *message) {
301
301
client *c = reinterpret_cast <client*>(ln->value );
302
302
if (c->flags & CLIENT_CLOSE_ASAP) // avoid blocking if the write will be ignored
303
303
continue ;
304
- fastlock_lock (&c->lock );
304
+ if (FCorrectThread (c))
305
+ fastlock_lock (&c->lock );
305
306
addReplyPubsubMessage (c,channel,message);
306
- fastlock_unlock (&c->lock );
307
+ if (FCorrectThread (c))
308
+ fastlock_unlock (&c->lock );
307
309
receivers++;
308
310
}
309
311
}
@@ -321,10 +323,12 @@ int pubsubPublishMessage(robj *channel, robj *message) {
321
323
{
322
324
if (pat->pclient ->flags & CLIENT_CLOSE_ASAP)
323
325
continue ;
324
- fastlock_lock (&pat->pclient ->lock );
326
+ if (FCorrectThread (pat->pclient ))
327
+ fastlock_lock (&pat->pclient ->lock );
325
328
addReplyPubsubPatMessage (pat->pclient ,
326
329
pat->pattern ,channel,message);
327
- fastlock_unlock (&pat->pclient ->lock );
330
+ if (FCorrectThread (pat->pclient ))
331
+ fastlock_unlock (&pat->pclient ->lock );
328
332
receivers++;
329
333
}
330
334
}
You can’t perform that action at this time.
0 commit comments