1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed CID 1197453

This commit is contained in:
AlexVinS 2016-11-25 17:39:06 +03:00
parent b908c70468
commit e7a0bd690a

View File

@ -471,16 +471,11 @@ void CVCMIServer::loadGame()
c << ui8(0);
CConnection* cc; //tcp::socket * ss;
for(int i=0; i<clients; i++)
gh.conns.insert(firstConnection);
for(int i=1; i<clients; i++)
{
if(!i)
{
cc = &c;
}
else
{
auto s = new boost::asio::ip::tcp::socket(acceptor->get_io_service());
auto s = make_unique<boost::asio::ip::tcp::socket>(acceptor->get_io_service());
acceptor->accept(*s,error);
if(error) //retry
{
@ -488,9 +483,8 @@ void CVCMIServer::loadGame()
i--;
continue;
}
cc = new CConnection(s,NAME);
}
gh.conns.insert(cc);
gh.conns.insert(new CConnection(s.release(),NAME));
}
gh.run(true);