Don't have dangling expires

Former-commit-id: 83c8977033
This commit is contained in:
John Sully committed 2021-05-29 01:07:46 +00:00
1 parent 9cf5590158
commit ea5317c310
1 file changed
+7
+7
View File
@@ -152,6 +152,13 @@ int dbAsyncDelete(redisDb *db, robj *key) {
if (de) {
robj *val = (robj*)dictGetVal(de);
if (val->FExpires())
{
/* Deleting an entry from the expires dict will not free the sds of
* the key, because it is shared with the main dictionary. */
removeExpireCore(db,key,de);
}
/* Tells the module that the key has been unlinked from the database. */
moduleNotifyKeyUnlink(key,val);