From eaee0f5dd02da02365b9a442b6eb27d95e2cd1ce Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 11 Jul 2014 22:07:48 +0200 Subject: Core/Misc: Fixed compiler segmentation fault when compiling AsyncAcceptor with gcc 4.7.2 --- src/server/shared/Networking/AsyncAcceptor.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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 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(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(std::move(this->_socket))->Start(); } AsyncAccept(); -- cgit v1.2.3