Skip to content

fix: NetworkList serialization sends the list values before the cached updates, to prevent duplicate application#1917

Merged
jeffreyrainy merged 2 commits intodevelopfrom
fix/network-list-duplication
Apr 29, 2022
Merged

fix: NetworkList serialization sends the list values before the cached updates, to prevent duplicate application#1917
jeffreyrainy merged 2 commits intodevelopfrom
fix/network-list-duplication

Conversation

@jeffreyrainy
Copy link
Copy Markdown
Contributor

fix: NetworkList serialization sends the list values before the cached updates, to prevent duplicate application

MTT-3021
#1590

@jeffreyrainy
Copy link
Copy Markdown
Contributor Author

The story here is that when user code modifies a NetworkList during OnNetworkSpawn (or other notifications) the NetworkList gets serialized while it has dirty events. So, the modified list is sent, and then the dirty events get sent at the next update. The client side applies the event, thus duplicating the list.

The proper catch-all flow, to me, was to always serialize the list as it was before the dirty events came in, and trust them to be applied at the next update.

Copy link
Copy Markdown
Member

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jeffreyrainy jeffreyrainy merged commit 24388c4 into develop Apr 29, 2022
@jeffreyrainy jeffreyrainy deleted the fix/network-list-duplication branch April 29, 2022 15:46
jeffreyrainy added a commit that referenced this pull request May 4, 2022
ashwinimurt pushed a commit that referenced this pull request May 5, 2022
…1930)

* fix: NetworkList serialization sends the list values before the cached updates, to prevent duplicate application (#1917)

* fix: shutting down properly, when failing to StartHost or StartClient. This allows the next attempt to not fail automatically. (#1918)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants