Skip to content

fix: Client-Side NetworkEvent.Disconnect can throw an exception in UnityTransport #1884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Apr 19, 2022

This fixes the issue where if a client has messages to be sent in the outbound send queue and it also processes a NetworkEvent.Disconnect from the server in the same frame, then the following exception will be thrown:
"[Error] Error sending the message: NetworkVersion is invalid, likely caused by stale connection 0"

MTT-3359

Changelog

  • Fixed: client throwing an exception if it has messages in the outbound queue when processing the NetworkEvent.Disconnect event and is using UTP.

Testing and Documentation

  • Includes integration tests.

The fix for the bug.
The integration test to verify the fix
Copy link
Contributor

@0xFA11 0xFA11 left a comment

Choose a reason for hiding this comment

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

🚀

@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) April 20, 2022 14:35
@NoelStephensUnity NoelStephensUnity merged commit e4d5166 into develop Apr 20, 2022
@NoelStephensUnity NoelStephensUnity deleted the fix/client-side-networkevent-disconnect-and-unitytransport branch April 20, 2022 14:46
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