Auto-reconnect & sync after connection loss

Hello!
I’m currently developing an outdoor game with java and I was wondering if there is a way to automatically reconnect user if they loose their internet for a brief amount of time, and then resync with the game after the connection has been established again. Currently, when a user looses internet, they get kicked and when they try to rejoin, the other persons get kicked. I don’t quite understand the behaviour, but still I’d like to know if there is a way to auto-reconnect/fetch the data that has been sent in the meantime.

Thanks in advance.

Hi @Liam,

Please can you provide a bit more information about how your game works; are users playing in an authoritative match or client relayed? How are you currently attempting to rejoin the match (assuming you’re using matches)?

There is no built-in way to automatically reconnect to a match and re-sync all of the missed data, this is something you would need to build into your match handler (if using server authoritative) or have the host client send the updated game state (if using client relayed) when the user rejoins.

For an example of how to handle disconnects and player’s rejoining please take a look at the Nakama Project Template Match Handler.

I haven’t made the runtime code for the server yet, but I think I will go with the authorative multiplayer