Skip to content

Commit

Permalink
Only call finalizer if privdata is different
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor committed Aug 2, 2021
1 parent dca7691 commit 6b40487
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion async.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,8 @@ static int __redisAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, redis
if (de != NULL) {
existcb = dictGetEntryVal(de);
cb.pending_subs = existcb->pending_subs + 1;
__redisRunFinalizer(ac,existcb);
if (existcb->privdata != cb.privdata)
__redisRunFinalizer(ac,existcb);
}

ret = dictReplace(cbdict,sname,&cb);
Expand Down

0 comments on commit 6b40487

Please sign in to comment.