aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/worker.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/worker.c')
-rw-r--r--src/worker.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/worker.c b/src/worker.c
index 05243ac..7471cd1 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -195,8 +195,13 @@ int worker_main(struct worker *worker, UNUSED int argc, UNUSED char *argv[])
log("Waiting for a new command\n");
ret = msg_recv(worker->fd, &request);
- if (ret < 0)
+ if (ret < 0) {
+ if (errno == EINVAL && global_stop_flag) {
+ ret = 0;
+ break;
+ }
return ret;
+ }
ret = worker_msg_handler(worker, &request);
msg_free(&request);