relay: do not immediately shutdown (and crash)
There is two bugs here:
1. the failed worker check was off-by-one (due to code changes for
regex_t per thread)
2. the sentinel was written over the last worker
@@ -821,8 +821,8 @@ main(int argc, char * const argv[])
break;
}
}
- workers[id + 0] = NULL; /* sentinel */
- if (id < 1 + workercnt) {
+ workers[id + 1] = NULL; /* sentinel */
+ if (id < workercnt) {
logerr("shutting down due to errors\n");
keep_running = 0;
}
