Skip to content
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

FizzySteam NextClient will not trigger transport's OnDisconnected #46

Open
wappenull opened this issue Jan 12, 2023 · 1 comment
Open

Comments

@wappenull
Copy link

wappenull commented Jan 12, 2023

NextClient will not call its own OnDisconnected event if disconnection is run via FizzyTransport.Shutdown (which include voluntary disconnect) which does not call NextClient.InternalDisconnect, result in transport.OnClientDisconnected never called, result in NetworkClient.RemoveTransportHandlers never called.

This will become error elsewhere such as client will fire AddPlayerMessage multiple times, etc.

Just to cross post it here from Mirror github repo issue.
Full detail is in my comment in that issue.

Solution:

Add following line to your "FizzySteamworks\NextClient.cs" at location in this screen shot.

if( Connected )
    InternalDisconnect( );

image

@Chykary
Copy link
Owner

Chykary commented Feb 5, 2023

Want to submit a PR? Then I can merge and put up a new release. :-)

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

No branches or pull requests

2 participants