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 f1a65ef2368d6704edad84176c86068249e25678
parent f39919e98c9051175d920bc6a626e8115e0afbd1
Author: Joris Vink <joris@coders.se>
Date:   Thu,  3 Jun 2021 14:02:28 +0200

Small improvement to the Python kore.timer() api.

Do not allow kore.timer() to be called from the parent process
as it shouldn't be run there.

This makes Kore fail more gracefully.

src/python.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/python.c b/src/python.c @@ -2441,6 +2441,12 @@ python_kore_timer(PyObject *self, PyObject *args, PyObject *kwargs) int flags; struct pytimer *timer; + if (worker == NULL) { + PyErr_SetString(PyExc_RuntimeError, + "kore.timer not supported on parent process"); + return (NULL); + } + if (!PyArg_ParseTuple(args, "OKi", &obj, &ms, &flags)) return (NULL);