diff --git a/lib/path.c b/lib/path.c index b8e1d9259..95b72745d 100644 --- a/lib/path.c +++ b/lib/path.c @@ -62,12 +62,14 @@ static void * path_run_async(void *arg) p->overrun += expir; warn("Overrun detected for path: overruns=%" PRIu64, expir); } + + if (p->received == 0) + continue; if (path_run_hook(p, HOOK_ASYNC)) continue; - if (p->received > 0) - path_write(p); + path_write(p); } return NULL; diff --git a/lib/websocket.c b/lib/websocket.c index 61caaa1ca..153738341 100644 --- a/lib/websocket.c +++ b/lib/websocket.c @@ -407,7 +407,7 @@ int websocket_write(struct node *n, struct msg *pool, int poolsize, int first, i pthread_mutex_unlock(&w->write.mutex); - return 0; + return 1; } static struct node_type vt = {