diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/shared/Networking/AsyncAcceptor.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/shared/Networking/AsyncAcceptor.h b/src/server/shared/Networking/AsyncAcceptor.h index 789bd9c3a74..b698e507954 100644 --- a/src/server/shared/Networking/AsyncAcceptor.h +++ b/src/server/shared/Networking/AsyncAcceptor.h @@ -26,8 +26,8 @@ template <class T> class AsyncAcceptor { public: - AsyncAcceptor(boost::asio::io_service& ioService, std::string bindIp, int port) : - _socket(ioService), + AsyncAcceptor(boost::asio::io_service& ioService, std::string bindIp, int port) : + _socket(ioService), _acceptor(ioService, tcp::endpoint(boost::asio::ip::address::from_string(bindIp), port)) { AsyncAccept(); @@ -49,7 +49,8 @@ private: { if (!error) { - std::make_shared<T>(std::move(_socket))->Start(); + // this-> is required here to fix an segmentation fault in gcc 4.7.2 - reason is lambdas in a templated class + std::make_shared<T>(std::move(this->_socket))->Start(); } AsyncAccept(); |