Change warning to fatal error (#7278)
Co-authored-by: Serhii Hadzhilov <serhii-external@symless.com>
This commit is contained in:
parent
1a810ccdd7
commit
944abfaa1a
1 changed files with 2 additions and 3 deletions
|
|
@ -540,7 +540,6 @@ ServerApp::startServer()
|
|||
assert(m_serverState == kInitialized);
|
||||
}
|
||||
|
||||
double retryTime {};
|
||||
ClientListener* listener = NULL;
|
||||
try {
|
||||
listener = openClientListener(args().m_config->getSynergyAddress());
|
||||
|
|
@ -554,10 +553,9 @@ ServerApp::startServer()
|
|||
return true;
|
||||
}
|
||||
catch (XSocketAddressInUse& e) {
|
||||
LOG((CLOG_WARN "cannot listen for clients: %s", e.what()));
|
||||
LOG((CLOG_CRIT "cannot listen for clients: %s", e.what()));
|
||||
closeClientListener(listener);
|
||||
updateStatus(String("cannot listen for clients: ") + e.what());
|
||||
retryTime = 10.0;
|
||||
}
|
||||
catch (XBase& e) {
|
||||
LOG((CLOG_CRIT "failed to start server: %s", e.what()));
|
||||
|
|
@ -568,6 +566,7 @@ ServerApp::startServer()
|
|||
if (args().m_restartable) {
|
||||
// install a timer and handler to retry later
|
||||
assert(m_timer == NULL);
|
||||
const auto retryTime = 10.0;
|
||||
LOG((CLOG_DEBUG "retry in %.0f seconds", retryTime));
|
||||
m_timer = m_events->newOneShotTimer(retryTime, NULL);
|
||||
m_events->adoptHandler(Event::kTimer, m_timer,
|
||||
|
|
|
|||
Loading…
Reference in a new issue