etcp: переупорядочить close + защита state==2 во всех API-точках; topo: правильная очистка group nodes и registry; chat/member: новый модуль member_sync; chatgui: обновления транспорта и UI
This commit is contained in:
1 parent
b2e4aadbf0
commit
7f901c01e1
38 files changed
+1275
-540
No files matched your search
@@ -101,15 +101,9 @@ void UtunNode::stop() {
|
||||
}
|
||||
|
||||
void UtunNode::finalize() {
|
||||
if (!m_instance) return;
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_GENERAL, "finalize: cleanup start");
|
||||
etcp_router_bind(m_instance, ETCP_RT_ID_CHAT, nullptr);
|
||||
chat_sync_destroy(m_instance);
|
||||
chat_core_destroy(m_instance);
|
||||
utun_instance_destroy(m_instance);
|
||||
if (m_ua) { uasync_destroy(m_ua, 0); m_ua = nullptr; }
|
||||
m_instance = nullptr;
|
||||
uasync_destroy(m_ua, 0);
|
||||
m_ua = nullptr;
|
||||
m_running = false;
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_GENERAL, "finalize: cleanup done");
|
||||
}
|
||||
|
||||
@@ -409,6 +403,12 @@ void UtunNode::runLoop() {
|
||||
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_GENERAL, "runLoop: poll exit m_stop=%d", (int)m_stop);
|
||||
|
||||
if (m_instance) {
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_GENERAL, "runLoop: destroying instance in worker thread");
|
||||
utun_instance_destroy(m_instance);
|
||||
m_instance = nullptr;
|
||||
}
|
||||
|
||||
signal(SIGINT, SIG_DFL);
|
||||
signal(SIGTERM, SIG_DFL);
|
||||
|
||||
|
||||
Reference in new issue
Block a user