diff options
-rw-r--r-- | cfgdir.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -226,7 +226,10 @@ scfg_read_cb(struct cfg *cfg, struct uring_task *task, int res) { struct server *scfg = container_of(task, struct server, task); - if (res < 0) { + if (task->dead) + return; + + if (res <= 0) { fprintf(stderr, "%s: error reading config file for %s: %s\n", __func__, scfg->name, strerror(-res)); server_delete(cfg, scfg); @@ -243,6 +246,9 @@ scfg_open_cb(struct cfg *cfg, struct uring_task *task, int res) { struct server *scfg = container_of(task, struct server, task); + if (task->dead) + return; + if (res < 0) { fprintf(stderr, "%s: open(%s) failed: %s\n", __func__, scfg->name, strerror(-res)); |