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:
parent
b908c70468
commit
e7a0bd690a
@ -471,26 +471,20 @@ 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)
|
||||
auto s = make_unique<boost::asio::ip::tcp::socket>(acceptor->get_io_service());
|
||||
acceptor->accept(*s,error);
|
||||
if(error) //retry
|
||||
{
|
||||
cc = &c;
|
||||
logNetwork->warn("Cannot establish connection - retrying...");
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto s = new boost::asio::ip::tcp::socket(acceptor->get_io_service());
|
||||
acceptor->accept(*s,error);
|
||||
if(error) //retry
|
||||
{
|
||||
logNetwork->warn("Cannot establish connection - retrying...");
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
cc = new CConnection(s,NAME);
|
||||
}
|
||||
gh.conns.insert(cc);
|
||||
|
||||
gh.conns.insert(new CConnection(s.release(),NAME));
|
||||
}
|
||||
|
||||
gh.run(true);
|
||||
|
Loading…
Reference in New Issue
Block a user