mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Fix crash in Endpoint::MessageThreadProc.
This commit is contained in:
parent
6351ee8fb3
commit
551f06c744
@ -59,10 +59,12 @@ void Endpoint::SetClient(const Stream::Ptr& client)
|
||||
m_Client = client;
|
||||
}
|
||||
|
||||
boost::thread thread(boost::bind(&Endpoint::MessageThreadProc, this, client));
|
||||
thread.detach();
|
||||
if (client) {
|
||||
boost::thread thread(boost::bind(&Endpoint::MessageThreadProc, this, client));
|
||||
thread.detach();
|
||||
|
||||
OnConnected(GetSelf());
|
||||
OnConnected(GetSelf());
|
||||
}
|
||||
}
|
||||
|
||||
void Endpoint::SendMessage(const Dictionary::Ptr& message)
|
||||
|
Loading…
x
Reference in New Issue
Block a user