Revert Endpoint::SetClient() change.

This commit is contained in:
Gunnar Beutner 2013-10-18 12:02:35 +02:00
parent e5b3a59aa3
commit dc566bf145
2 changed files with 2 additions and 9 deletions

View File

@ -38,11 +38,6 @@ Endpoint::Endpoint(void)
: m_Syncing(false)
{ }
Endpoint::~Endpoint(void)
{
SetClient(Stream::Ptr());
}
/**
* Checks whether this endpoint is connected.
*
@ -63,12 +58,11 @@ void Endpoint::SetClient(const Stream::Ptr& client)
if (m_Client)
m_Client->Close();
m_Thread.join();
m_Client = 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());
}

View File

@ -42,7 +42,6 @@ public:
DECLARE_TYPENAME(Endpoint);
Endpoint(void);
~Endpoint(void);
static boost::signals2::signal<void (const Endpoint::Ptr&)> OnConnected;
static boost::signals2::signal<void (const Endpoint::Ptr&, const Dictionary::Ptr&)> OnMessageReceived;