Change error priority based on param (#7279)

This commit is contained in:
Serhii Hadzhilov 2023-08-17 17:53:26 +04:00 committed by GitHub
parent 944abfaa1a
commit cfe20bea18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -553,7 +553,12 @@ ServerApp::startServer()
return true; return true;
} }
catch (XSocketAddressInUse& e) { catch (XSocketAddressInUse& e) {
LOG((CLOG_CRIT "cannot listen for clients: %s", e.what())); if (args().m_restartable) {
LOG((CLOG_ERR "cannot listen for clients: %s", e.what()));
}
else {
LOG((CLOG_CRIT "cannot listen for clients: %s", e.what()));
}
closeClientListener(listener); closeClientListener(listener);
updateStatus(String("cannot listen for clients: ") + e.what()); updateStatus(String("cannot listen for clients: ") + e.what());
} }