iceball icon indicating copy to clipboard operation
iceball copied to clipboard

Players get kicked due to the timeout when switching maps

Open dany-on-demand opened this issue 10 years ago • 6 comments

Noticeable with stuff like gen_city.lua which takes a long time to finish. We need to "pause" the time while the switch happens.

dany-on-demand avatar Feb 07 '15 17:02 dany-on-demand

Ideally, it would still send pings, but I'm not sure if that would be possible without overly complicating something.

rakiru avatar Feb 07 '15 18:02 rakiru

Perhaps we should make a pump function that long-running scripts can call periodically to handle the network buffers and whatever else ends up needing to run continuously. Or, once/if we make an event system, that can just be an event.

BR- avatar Feb 07 '15 19:02 BR-

Just a call to host.service() or w/e it is would probably be enough, but yeah, if we wrapped that in a generic function that needs called periodically, then anything else can get put in there too, and mods can hook it if they need to add to it.

rakiru avatar Feb 07 '15 23:02 rakiru

Something like PySnip's twisted.internet.reactor.LoopingCall maybe? Would making it multithreaded cause the typical problems?

LeComm avatar Feb 08 '15 14:02 LeComm

No-one suggested making it multithreaded, and twisted isn't multithreaded.

rakiru avatar Feb 08 '15 20:02 rakiru

Oops I was referring to the ping sending thing.

LeComm avatar Feb 09 '15 11:02 LeComm