Technically, look at the patch, TCP socket problems (though they're rare) are generated by auto inserting fakeplayers in
event player left void (when a player left). Func CreateInitialFakePlayers() is recalled, in it, a while loop to create one-by-one FP does create 2-3-4 of them(2-3-4 fps at once as C++ is fast), the slot info is sent 2-3-4 times to update it. Sending slot info too fastly reproduces the problem.
I tried removed calling CreateInitialFakePlayers() and relied on CreateFakePlayer() which means to creat A FP instead in
that event with the same condition (as below) but it even generated more TCP socket errors (talking about frequency).
if (GetNumHumanPlayers( ) < 4 && GetSlotsOpen() > 2)
CreateFakePlayer( );
I put the whole // auto insert part in if (!show) as it means for lobby. show ==true, means a player left in game not in lobby. but Ghost crashed after a while of running. The above part is also tested in if(!show) but the problem has not been resolved.
The player left event is messing it up and making the //auto insert go awry. I don't admin TCP socket errors are caused by this patch. AS there're dozen of reasons players get this error, especially if you broadcast to Garena. But I esteem very few TCP socket errors (1%) in my hosting of 4 games simultaneously.
Now, I think of putting //auto insert part in event player join, as it's surely where players are just about in lobby, no in-game leaving would mess it up. There must be a better place to put the part but I haven't found it yet.
Whenever I find out or think there's a good solution, there could be a better or even best solution. The helps from good coders are welcome.