server: Z21 ClientKernel fix crash on disconnect
See #53 When disabling communications, kernel object is deleted but EventLoop callback will run after and access deleted object through captured 'this' Temporary fix for this problem is to copy log ID value instead.
Dieser Commit ist enthalten in:
Ursprung
93d0dc62bf
Commit
5a291f0c91
@ -53,9 +53,9 @@ void ClientKernel::receive(const Message& message)
|
||||
{
|
||||
if(m_config.debugLogRXTX)
|
||||
EventLoop::call(
|
||||
[this, msg=toString(message)]()
|
||||
[logId_=logId, msg=toString(message)]()
|
||||
{
|
||||
Log::log(logId, LogMessage::D2002_RX_X, msg);
|
||||
Log::log(logId_, LogMessage::D2002_RX_X, msg);
|
||||
});
|
||||
|
||||
switch(message.header())
|
||||
@ -519,9 +519,9 @@ void ClientKernel::send(const Message& message)
|
||||
{
|
||||
if(m_config.debugLogRXTX)
|
||||
EventLoop::call(
|
||||
[this, msg=toString(message)]()
|
||||
[logId_=logId, msg=toString(message)]()
|
||||
{
|
||||
Log::log(logId, LogMessage::D2001_TX_X, msg);
|
||||
Log::log(logId_, LogMessage::D2001_TX_X, msg);
|
||||
});
|
||||
}
|
||||
else
|
||||
|
||||
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren