aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-07-11 22:07:48 +0200
committerShauren <shauren.trinity@gmail.com>2014-07-11 22:07:48 +0200
commiteaee0f5dd02da02365b9a442b6eb27d95e2cd1ce (patch)
tree9ac3aaf4834e7219e76156805bc235913364a405 /src
parent128217c4c48140103151bfaed5347f35ffce28f5 (diff)
Core/Misc: Fixed compiler segmentation fault when compiling AsyncAcceptor with gcc 4.7.2
Diffstat (limited to 'src')
-rw-r--r--src/server/shared/Networking/AsyncAcceptor.h7
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();