|
|
|
|
@ -344,16 +344,23 @@ void UtunNode::runLoop() {
|
|
|
|
|
uasync_poll(ua, 100); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "runLoop: poll exit m_stop=%d g_shutdown=%d", (int)m_stop, (int)g_shutdown); |
|
|
|
|
|
|
|
|
|
signal(SIGINT, SIG_DFL); |
|
|
|
|
signal(SIGTERM, SIG_DFL); |
|
|
|
|
g_signal_ua = nullptr; |
|
|
|
|
|
|
|
|
|
etcp_router_bind(m_instance, ETCP_RT_ID_CHAT, nullptr); |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "runLoop: etcp_router_unbind done"); |
|
|
|
|
chat_sync_destroy(m_instance); |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "runLoop: chat_sync_destroy done"); |
|
|
|
|
chat_core_destroy(m_instance); |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "runLoop: chat_core_destroy done"); |
|
|
|
|
utun_instance_destroy(m_instance); |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "runLoop: utun_instance_destroy done"); |
|
|
|
|
m_instance = nullptr; |
|
|
|
|
uasync_destroy(ua, 0); |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "runLoop: uasync_destroy done, emitting stopped"); |
|
|
|
|
g_currentNode = nullptr; |
|
|
|
|
QMetaObject::invokeMethod(this, [this] { emit stopped(); }); |
|
|
|
|
} |
|
|
|
|
|