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 e1183e22a6a7a970213bef80032275c2e18521cf
parent eb43fd31e199b9b63ffaba83a43ce11e3bd32e5c
Author: Joris Vink <joris@coders.se>
Date:   Fri,  5 Jul 2013 20:19:50 +0200

If the worker that owns the accept lock dies, make sure the next one in line can grab it. Otherwise kore comes to a halt (by not accepting new connections).

Diffstat:
src/worker.c | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/worker.c b/src/worker.c @@ -348,6 +348,15 @@ kore_worker_wait(int final) kore_log(LOG_NOTICE, "worker %d (pid: %d) gone, respawning new one", kw->id, kw->pid); + + if (kw->pid == accept_lock->lock) { + kore_log(LOG_NOTICE, + "worker %d owned accept lock, releasing", + kw->id); + + accept_lock->lock = accept_lock->next; + } + kore_worker_spawn(kw->id, kw->cpu); } else { kore_log(LOG_NOTICE,