summaryrefslogtreecommitdiffstats
path: root/src/Net/Listener.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Net/Listener.cpp')
-rw-r--r--src/Net/Listener.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Net/Listener.cpp b/src/Net/Listener.cpp
index 6da2762..1188ba3 100644
--- a/src/Net/Listener.cpp
+++ b/src/Net/Listener.cpp
@@ -20,6 +20,7 @@
#include "Listener.h"
#include <Common/Logger.h>
+#include <Net/ThreadManager.h>
#include <cerrno>
#include <cstring>
@@ -52,6 +53,10 @@ void Listener::handleAccept(const boost::system::error_code &error, boost::share
}
void Listener::handleConnect(boost::shared_ptr<Connection> con) {
+ Net::ThreadManager::get()->pushWork(boost::bind(&Listener::doHandleConnect, this, con));
+}
+
+void Listener::doHandleConnect(boost::shared_ptr<Connection> con) {
{
boost::lock_guard<boost::mutex> lock(mutex);
std::map<boost::shared_ptr<Connection>, std::pair<Signals::Connection, Signals::Connection> >::iterator it = connections.find(con);