diff --git a/server/harness.c b/server/harness.c index 5e41527..ea222b7 100644 --- a/server/harness.c +++ b/server/harness.c @@ -125,9 +125,10 @@ typedef struct nap_context_t_ { void nap_isr(int fd, short what, void *arg) { nap_context_t *context = arg; //info("nap_isr %p\n", p); - assert((context->p->state == PROCESS_WAITING) && (context->p->wait_flags & EV_TIMEOUT)); - context->timeout_fired = 1; - enqueue_runlist(context->p); + if ((context->p->state == PROCESS_WAITING) && (context->p->wait_flags & EV_TIMEOUT)) { + context->timeout_fired = 1; + enqueue_runlist(context->p); + } } int nap(long millis) {