Link Winsock after uasync and include socket headers first

This commit is contained in:
evgeny committed 2026-10-06 15:11:16 +02:00
1 parent e9e38ee029
commit c81e8e5025
2 files changed
+13 -4

No files matched your search

+7 -3
View File
@@ -1,3 +1,6 @@
#ifdef _WIN32
#include <winsock2.h>
#endif
#include <QCoreApplication>
#include <QApplication>
#include <QIcon>
@@ -39,9 +42,10 @@ static DWORD count_threads(void) {
static BOOL WINAPI console_ctrl_handler(DWORD dwCtrlType) {
if (dwCtrlType == CTRL_C_EVENT || dwCtrlType == CTRL_BREAK_EVENT) {
if (g_mainWindow)
QMetaObject::invokeMethod(g_mainWindow, [g_mainWindow] {
g_mainWindow->requestShutdown();
MainWindow* window = g_mainWindow;
if (window)
QMetaObject::invokeMethod(window, [window] {
window->requestShutdown();
}, Qt::QueuedConnection);
else if (g_ctrl_node)
g_ctrl_node->requestStop();