caused the Varnish child to die immediately after sending its 503 response
if the backend didn't respond.
Reviewed by: phk
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1376
d4fa192b-c00b-0410-8231-
f00ffab90ce4
void
HSH_Unbusy(struct object *o)
{
+ struct objhead *oh;
struct sess *sp;
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
assert(o->refcnt > 0);
if (o->cacheable)
EXP_Insert(o);
- LOCK(&o->objhead->mtx);
+ oh = o->objhead;
+ if (oh != NULL) {
+ CHECK_OBJ(oh, OBJHEAD_MAGIC);
+ LOCK(&oh->mtx);
+ }
o->busy = 0;
- UNLOCK(&o->objhead->mtx);
+ if (oh != NULL)
+ UNLOCK(&oh->mtx);
while (1) {
sp = TAILQ_FIRST(&o->waitinglist);
if (sp == NULL)