fix: ServerApp use the port configured by the user
This commit is contained in:
parent
8ef2319b0d
commit
0a67f63af6
1 changed files with 10 additions and 7 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue