From ff7a29db5c1017af629b8c3801bc5d18204aa82d Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Wed, 7 Jan 2026 14:35:41 +0100 Subject: [PATCH] control_socked: fix early module_done The thread is not joined yet so it may access the module data (check_message). This might have caused this failure: --- src/control_socket.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/control_socket.cpp b/src/control_socket.cpp index f42dd2622..8b8595ea6 100644 --- a/src/control_socket.cpp +++ b/src/control_socket.cpp @@ -3,7 +3,7 @@ * @author Martin Pulec */ /* - * Copyright (c) 2013-2025 CESNET + * Copyright (c) 2013-2026 CESNET, zájmové sdružení právnických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -976,8 +976,6 @@ void control_done(struct control_state *s) } assert(s->magic == MODULE_MAGIC); - module_done(&s->mod); - if(s->started) { s->stats_lock.lock(); s->stat_event_queue.push({}); @@ -999,6 +997,8 @@ void control_done(struct control_state *s) CLOSESOCKET(s->socket_fd); } + module_done(&s->mod); + delete s; }