TestRunnerSRL / bizhawk-co-op

Syncs inventory, ammo, and more of multiple players for a coop experience
GNU Lesser General Public License v3.0
56 stars 41 forks source link

Clients reconnect after unexpected disconnects #45

Closed bmclarnon closed 4 years ago

bmclarnon commented 4 years ago

When there's an unexpected disconnect (i.e., not kicked or room closing), clients will enter a "Reconnecting" state where they periodically try to reconnect with the server. Once connected, items will be re-synced within 1 minute, so it's safe for items to be collected while disconnected.

This change also reduces the client and server overhead of establishing a connection so that reconnect attempts aren't disruptive.

Tested: Ran on two computers, unplugged the ethernet cable from the client, collected items in both games, and then reconnected the ethernet cable.