Download

Multiplayer P2P ConnectionTimeout and Disconnection issues mid game (4.25)

I am making a multiplayer game that uses P2P servers with one player being the host. I noticed an issue where clients would often seemingly randomly disconnect, and am assuming it is because their internet is dropping for short periods of time. This does not happen when trying to initially connect to a server or during servertravel like most issues i’ve found have. This is mid game.

I have in my DefaultEngine.ini the proper “ConnectionTimeout=15, InitialConnectTimeout=15” etc… stuff, however the clients are unable to reconnect during this period at all, and are always sent back to the menu with the ConnectionTimeout or ConnectionLost error.

Additionally, I am trying to set up a system where it shows the player’s name and a DC symbol after the client disconnects. I currently have it setup to OnEndViewTarget, because EventLogout under game mode doesn’t work properly. The issue is, as soon as the client loses connection for that split second, they instantly show the disconnect status. What event should I trigger once the client is fully timed out? (There is no option planned to reconnect by the way).

So far I’ve used all Blueprints for this project and am very inexperienced with C++, so I’d much prefer a BP solution to this issue, however if C++ is the only way I am willing to try it as well.

Thank you in advance!