mirror of https://github.com/Icinga/icinga2.git
Revert Endpoint::SetClient() change.
This commit is contained in:
parent
e5b3a59aa3
commit
dc566bf145
|
@ -38,11 +38,6 @@ Endpoint::Endpoint(void)
|
||||||
: m_Syncing(false)
|
: m_Syncing(false)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
Endpoint::~Endpoint(void)
|
|
||||||
{
|
|
||||||
SetClient(Stream::Ptr());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether this endpoint is connected.
|
* Checks whether this endpoint is connected.
|
||||||
*
|
*
|
||||||
|
@ -63,12 +58,11 @@ void Endpoint::SetClient(const Stream::Ptr& client)
|
||||||
if (m_Client)
|
if (m_Client)
|
||||||
m_Client->Close();
|
m_Client->Close();
|
||||||
|
|
||||||
m_Thread.join();
|
|
||||||
|
|
||||||
m_Client = client;
|
m_Client = client;
|
||||||
|
|
||||||
if (client) {
|
if (client) {
|
||||||
m_Thread = boost::thread(boost::bind(&Endpoint::MessageThreadProc, this, client));
|
boost::thread thread(boost::bind(&Endpoint::MessageThreadProc, this, client));
|
||||||
|
thread.detach();
|
||||||
|
|
||||||
OnConnected(GetSelf());
|
OnConnected(GetSelf());
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,6 @@ public:
|
||||||
DECLARE_TYPENAME(Endpoint);
|
DECLARE_TYPENAME(Endpoint);
|
||||||
|
|
||||||
Endpoint(void);
|
Endpoint(void);
|
||||||
~Endpoint(void);
|
|
||||||
|
|
||||||
static boost::signals2::signal<void (const Endpoint::Ptr&)> OnConnected;
|
static boost::signals2::signal<void (const Endpoint::Ptr&)> OnConnected;
|
||||||
static boost::signals2::signal<void (const Endpoint::Ptr&, const Dictionary::Ptr&)> OnMessageReceived;
|
static boost::signals2::signal<void (const Endpoint::Ptr&, const Dictionary::Ptr&)> OnMessageReceived;
|
||||||
|
|
Loading…
Reference in New Issue