From b7294a28afab44c2294bf70baa296bdb81b847c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 18 Jun 2019 07:23:16 +0300 Subject: [PATCH] MXS-2547: Assert that workers aren't stopped If a worker is stopped, none of the Worker::execute or post_message methods should be called. --- server/core/worker.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/core/worker.cc b/server/core/worker.cc index 728cbca72..6d6990caa 100644 --- a/server/core/worker.cc +++ b/server/core/worker.cc @@ -718,6 +718,8 @@ size_t Worker::execute_concurrently(Task& task) bool Worker::post_message(uint32_t msg_id, intptr_t arg1, intptr_t arg2) { + ss_dassert(state() != Worker::STOPPED); + // NOTE: No logging here, this function must be signal safe. MessageQueue::Message message(msg_id, arg1, arg2);