fix: ServerApp use the port configured by the user
This commit is contained in:
@ -73,13 +73,16 @@ ServerApp::ServerApp(IEventQueue *events, const QString &processName) : App(even
|
|||||||
void ServerApp::parseArgs()
|
void ServerApp::parseArgs()
|
||||||
{
|
{
|
||||||
if (const auto address = Settings::value(Settings::Core::Interface).toString(); !address.isEmpty()) {
|
if (const auto address = Settings::value(Settings::Core::Interface).toString(); !address.isEmpty()) {
|
||||||
try {
|
*m_deskflowAddress = NetworkAddress(address.toStdString(), Settings::value(Settings::Core::Port).toInt());
|
||||||
*m_deskflowAddress = NetworkAddress(address.toStdString(), kDefaultPort);
|
} else {
|
||||||
m_deskflowAddress->resolve();
|
*m_deskflowAddress = NetworkAddress(Settings::value(Settings::Core::Port).toInt());
|
||||||
} catch (SocketAddressException &e) {
|
}
|
||||||
LOG_CRIT("%s: %s" BYE, qPrintable(processName()), e.what(), qPrintable(processName()));
|
|
||||||
bye(s_exitArgs);
|
try {
|
||||||
}
|
m_deskflowAddress->resolve();
|
||||||
|
} catch (SocketAddressException &e) {
|
||||||
|
LOG_CRIT("%s: %s" BYE, qPrintable(processName()), e.what(), qPrintable(processName()));
|
||||||
|
bye(s_exitArgs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user