If I use Network Simulator to disable a Relay server’s connection for 15 seconds, something strange happens:
The server does NOT call OnTransportFailure.
Clients, when attempting to join with the joincode via Relay, are told by Relay that the join code is valid, attempt to join, and then 5-10 seconds later they finish failing to connect.
How do I fix this, so that Relay properly notices when a server has timed out, and the server properly called OnTransportFailure after disconnecting due to time out?
Which NGO and editor versions? You may want to upgrade NGO at least.
I’m not sure if transport failure should get called on a timeout. Personally I don’t feel like this is a transport failure but rather a common disconnect due to a timeout. The relay server will time out eventually.
I don’t think this is an issue that needs solving on your end, and may not even be solvable on your end other than specifying a custom Relay timeout (I believe you can set this, may be wrong though).
You should also try to verify this with an actual disconnect, aka unplug the cable or disconnect from wifi to see if the behaviour is the same. Rules out that this is just simulator-only behaviour.
This is the latest Unity 6 version, with the most recent networking packages. The server does not naturally realize it’s timed out, regardless of time passing.