From fc605b119eea165323ef7852b9570e36a02258d9 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 30 Mar 2015 13:50:53 +0800 Subject: [PATCH] Webui: add delay in shutdown command in order to send out response msg --- src/webui/webapplication.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webui/webapplication.cpp b/src/webui/webapplication.cpp index 90adb1519..3284dad70 100644 --- a/src/webui/webapplication.cpp +++ b/src/webui/webapplication.cpp @@ -290,12 +290,12 @@ void WebApplication::action_version_qbittorrent() void WebApplication::action_command_shutdown() { qDebug() << "Shutdown request from Web UI"; + CHECK_URI(0); + // Special case handling for shutdown, we // need to reply to the Web UI before // actually shutting down. - - CHECK_URI(0); - QTimer::singleShot(0, qApp, SLOT(quit())); + QTimer::singleShot(100, qApp, SLOT(quit())); } void WebApplication::action_command_download()