chatgui: fix Ctrl-C on Linux — remove thread_local from g_currentNode

SIGINT on Linux can be delivered to any thread (not just worker).
signal_handler uses g_currentNode->requestStop(); with thread_local,
g_currentNode was nullptr in non-worker threads — Ctrl-C did nothing.

Removing thread_local fixes signal delivery: g_currentNode is set once
before signal handler is registered, pointer read is atomic on x86/x64.
This commit is contained in:
Evgeny committed 2026-07-24 16:02:49 +03:00
1 parent e8920fe00e
commit df8d910efa
1 file changed
+1 -1
+1 -1
View File
@@ -33,7 +33,7 @@ extern "C" {
#define ETCP_RT_ID_CHAT 0x11
static thread_local UtunNode* g_currentNode = nullptr;
static UtunNode* g_currentNode = nullptr;
static void signal_handler(int sig) {
(void)sig;