Delay in Network Resync for Clients After Host Re-hosts

Delay in Network Resync for Clients After Host Re-hosts

Description:

We are experiencing a delay in network synchronization when the host of a multiplayer game stops their server and then re-hosts. Here’s the situation:

  • A player hosts a match, and the “Network List” (a custom struct) syncs correctly with all clients.
  • When the host stops the server and re-hosts, there is a noticeable delay in the synchronization of the network data for clients that were previously connected to the old host (delays range from 10 seconds to 50+ seconds).
  • This issue does not occur if the host closes their application completely and restarts.
  • The client closing their application has no effect on this issue.
  • New clients (those that did not connect to the previous session) do not experience this delay, and the host version of the list updates as expected.

Steps to Reproduce:

  1. Have a player host a multiplayer match with a custom “Network List.”
  2. Clients connect to the server, and everything syncs correctly.
  3. The host shuts down the server and then re-hosts it.
  4. Clients who were previously connected to the first server experience a delay in the resync of the “Network List.”
  5. New clients joining the re-hosted server do not experience any delay.

Expected Behavior: When the host stops and re-hosts, all clients, including previously connected ones, should immediately sync with the new host without any noticeable delay in the data for the “Network List.”

Observed Behavior: Only new clients experience immediate synchronization with the new host. Clients that were previously connected experience a noticeable delay before the “Network List” is updated and resynced correctly.

Things I’ve Tried:

  • Investigated the host migration and re-hosting process, but the issue persists.
  • Checked for network message delays and race conditions, but could not identify the root cause.

Environment:

  • Unity version: 6.000.00.30f1
  • Network transport Solution tried: Facepunch, Local Network
  • Netcode for GameObjects version tried: 2.2, 2.1, 1.11.0
3 Likes

I have been trying to poke this more to little avail

Things I’ve Tried:

  • Re-Instancing the list when a server starts encase there was any weird left over data.
  • Checking I closed the transport correctly.
  • Aysnc the disconnection process with various delays.

Any update on this?