Skip to content

Commit

Permalink
Add an assert to try to catch #1853
Browse files Browse the repository at this point in the history
  • Loading branch information
bsdphk committed Aug 22, 2019
1 parent eaaa5f5 commit eed8289
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/varnishd/cache/cache_lck.c
Expand Up @@ -212,6 +212,7 @@ Lck_CondWait(pthread_cond_t *cond, struct lock *lck, vtim_real when)
assert(when > 1e9);
ts.tv_nsec = (long)(modf(when, &t) * 1e9);
ts.tv_sec = (long)t;
assert(ts.tv_nsec >= 0 && ts.tv_nsec < 999999999);
errno = pthread_cond_timedwait(cond, &ilck->mtx, &ts);
assert(errno == 0 ||
errno == ETIMEDOUT ||
Expand Down

0 comments on commit eed8289

Please sign in to comment.