mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +00:00
Web UI shutdown fix.
This commit is contained in:
parent
669d5a12a2
commit
368ae43849
@ -277,9 +277,20 @@ void HttpConnection::respond() {
|
||||
}
|
||||
if (list[0] == "command") {
|
||||
const QString& command = list[1];
|
||||
respondCommand(command);
|
||||
m_generator.setStatusLine(200, "OK");
|
||||
write();
|
||||
if (command == "shutdown") {
|
||||
qDebug() << "Shutdown request from Web UI";
|
||||
// Special case handling for shutdown, we
|
||||
// need to reply to the Web UI before
|
||||
// actually shutting down.
|
||||
m_generator.setStatusLine(200, "OK");
|
||||
write();
|
||||
// Exit application
|
||||
qApp->exit();
|
||||
} else {
|
||||
respondCommand(command);
|
||||
m_generator.setStatusLine(200, "OK");
|
||||
write();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -595,10 +606,6 @@ void HttpConnection::respondCommand(const QString& command) {
|
||||
QBtSession::instance()->recheckTorrent(m_parser.post("hash"));
|
||||
return;
|
||||
}
|
||||
if (command == "shutdown") {
|
||||
qDebug() << "Shutdown request from Web UI";
|
||||
qApp->exit();
|
||||
}
|
||||
}
|
||||
|
||||
void HttpConnection::decreaseTorrentsPriority(const QStringList &hashes) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user