kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 2576427dc07321bd80c9ccbf18d5f5bb3221f942
parent a2d48feeb7e279d0e84068e1d7195b85eba4137a
Author: Joris Vink <joris@coders.se>
Date:   Tue, 14 Sep 2021 15:45:34 +0200

Simplify if a worker needs to be added to msg.

Just look if the kore_worker data structure its ps member is non NULL.
If it is, it was started by the parent process at some point.

Diffstat:
src/msg.c | 18++----------------
1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/src/msg.c b/src/msg.c @@ -60,23 +60,9 @@ kore_msg_parent_init(void) struct kore_worker *kw; for (idx = 0; idx < worker_count; idx++) { - if (keymgr_active == 0) { - if (idx == KORE_WORKER_KEYMGR_IDX || - idx == KORE_WORKER_ACME_IDX) - continue; - } - - if (idx == KORE_WORKER_ACME_IDX) { -#if defined(KORE_USE_ACME) - if (acme_domains == 0) - continue; -#else - continue; -#endif - } - kw = kore_worker_data(idx); - kore_msg_parent_add(kw); + if (kw->ps != NULL) + kore_msg_parent_add(kw); } kore_msg_register(KORE_MSG_SHUTDOWN, msg_type_shutdown);