Prolonging timeout when connecting to server

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
MAD_Hades
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Dec 20, 2017 6:37 pm
Contact:

Prolonging timeout when connecting to server

Post by MAD_Hades »

I am currently trying to create a server hosting system for factorio. One of the things that I want to optimize is the ressource usage of idle servers. For this, I want to shut down any servers, that have had no players on them for some time.

In order to still make it possible for players to join these hibernated servers (to the player it should look like the server is running normally), I created a reverse-proxy in go. The proxy listens on a port for any new clients. If one of them connects, it starts the factorio-server and then acts as a middleman, passing the packets from client to server. I implemented a MVP for this and it does already work for games joined directly using the address.

But I see one potential problem: If the map is very large (so the server takes some time to start) and there is more latency than in my current dev setup (where everything is in the same network), the client could time out before the reply from the server is received. Now my question is: Is there any way to prolong the timeout (it seems to be 2 seconds), like sending some kind of dummy frame?

Also, if I want to enable this to work with public games, would there be something else that would have to be taken care of?

Thank you for your help!

Post Reply

Return to “Technical Help”