[master] 114bef7 No need to rearm an object the exp thread has already deref'ed
Nils Goroll
nils.goroll at uplex.de
Wed May 11 15:57:05 CEST 2016
commit 114bef78f13cdfdfbf5baa26e6a31ea36fab0bbf
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Wed May 11 15:55:36 2016 +0200
No need to rearm an object the exp thread has already deref'ed
Fixes https://github.com/nigoroll/varnish-modules/issues/1
diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c
index e226fee..969b117 100644
--- a/bin/varnishd/cache/cache_expire.c
+++ b/bin/varnishd/cache/cache_expire.c
@@ -150,7 +150,8 @@ EXP_Rearm(struct objcore *oc, double now, double ttl, double grace, double keep)
CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
assert(oc->refcnt > 0);
- AN(oc->exp_flags & OC_EF_REFD);
+ if (! (oc->exp_flags & OC_EF_REFD))
+ return;
if (!isnan(ttl))
oc->ttl = now + ttl - oc->t_origin;
More information about the varnish-commit
mailing list