dccex: fix: crash caused by failing tcp connect
caused by unhandled exception see #120
Dieser Commit ist enthalten in:
Ursprung
5f3bf103b3
Commit
acfc28bc89
@ -282,7 +282,10 @@ bool DCCEXInterface::setOnline(bool& value, bool simulation)
|
||||
m_kernel->stop();
|
||||
m_kernel.reset();
|
||||
|
||||
setState(InterfaceState::Offline);
|
||||
if(status->state != InterfaceState::Error)
|
||||
{
|
||||
setState(InterfaceState::Offline);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#include "../../../utils/rtrim.hpp"
|
||||
#include "../../../core/eventloop.hpp"
|
||||
#include "../../../log/log.hpp"
|
||||
#include "../../../log/logmessageexception.hpp"
|
||||
#include "../../../utils/inrange.hpp"
|
||||
#include "../../../utils/fromchars.hpp"
|
||||
#include "../../../utils/displayname.hpp"
|
||||
@ -82,7 +83,20 @@ void Kernel::start()
|
||||
m_ioContext.post(
|
||||
[this]()
|
||||
{
|
||||
m_ioHandler->start();
|
||||
try
|
||||
{
|
||||
m_ioHandler->start();
|
||||
}
|
||||
catch(const LogMessageException& e)
|
||||
{
|
||||
EventLoop::call(
|
||||
[this, e]()
|
||||
{
|
||||
Log::log(logId, e.message(), e.args());
|
||||
error();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
m_startupDelayTimer.expires_after(boost::asio::chrono::milliseconds(m_config.startupDelay));
|
||||
m_startupDelayTimer.async_wait(std::bind(&Kernel::startupDelayExpired, this, std::placeholders::_1));
|
||||
|
||||
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren