Skip to content

Commit 6b40487

Browse files
committed
Only call finalizer if privdata is different
1 parent dca7691 commit 6b40487

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

async.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,8 @@ static int __redisAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, redis
820820
if (de != NULL) {
821821
existcb = dictGetEntryVal(de);
822822
cb.pending_subs = existcb->pending_subs + 1;
823-
__redisRunFinalizer(ac,existcb);
823+
if (existcb->privdata != cb.privdata)
824+
__redisRunFinalizer(ac,existcb);
824825
}
825826

826827
ret = dictReplace(cbdict,sname,&cb);

0 commit comments

Comments
 (0)