mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 20:06:02 +02:00
Merge pull request #6898 from Atlante45/fix/ds-shutdown-debug
Postpone logging of the shutdown reason
This commit is contained in:
commit
40f2afb284
2 changed files with 7 additions and 5 deletions
|
@ -184,13 +184,15 @@ bool HTTPManager::bindSocket() {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
qCritical() << "Failed to open HTTP server socket:" << errorString() << " can't continue";
|
QString errorMessage = "Failed to open HTTP server socket: " + errorString() + ", can't continue";
|
||||||
QMetaObject::invokeMethod(this, "queuedExit", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, "queuedExit", Qt::QueuedConnection, Q_ARG(QString, errorMessage));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HTTPManager::queuedExit() {
|
void HTTPManager::queuedExit(QString errorMessage) {
|
||||||
|
if (!errorMessage.isEmpty()) {
|
||||||
|
qCCritical(embeddedwebserver) << qPrintable(errorMessage);
|
||||||
|
}
|
||||||
QCoreApplication::exit(SOCKET_ERROR_EXIT_CODE);
|
QCoreApplication::exit(SOCKET_ERROR_EXIT_CODE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void isTcpServerListening();
|
void isTcpServerListening();
|
||||||
void queuedExit();
|
void queuedExit(QString errorMessage);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool bindSocket();
|
bool bindSocket();
|
||||||
|
|
Loading…
Reference in a new issue