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

Foundry no longer displays successful socket reconnection #7006

Closed
aaclayton opened this issue Apr 25, 2022 · 1 comment
Closed

Foundry no longer displays successful socket reconnection #7006

aaclayton opened this issue Apr 25, 2022 · 1 comment
Assignees
Labels
api Issues related to the API used by Mod Devs bug Functionality which is not working as intended

Comments

@aaclayton
Copy link
Contributor

Originally in GitLab by @kakaroto

Something I noticed today while testing, if a user loses websocket connection for some reason, Foundry would show the notification "You have lost connection to the server, attempting to re-establish.", but there's no further notifications, even after the socket has reconnected.

I know that Foundry used to display the successful reconnection message in previous versions, but now it doesn't anymore, and I realized that users will refresh the page even though it immediately reconnected successfully, simply because they don't get that feedback that the connection was re-established.

Looking at foundry.js, I can still see it :

    // Reconnect succeeded
    this.socket.on('reconnect', () => {
      ui.notifications.info("Server connection re-established.");
    });

However, I know that you upgraded from socket.io v2 to v3 recently and according to this : https://socket.io/docs/v3/migrating-from-2-x-to-3-0/, you need to use this.socket.io.on('reconnect' instead of this.socket.on('reconnect' :

image

Thanks.

@aaclayton
Copy link
Contributor Author

Thanks for the heads up about this change, would have been nice for them to log a warning or something if you were using the wrong (old) event syntax.

@aaclayton aaclayton self-assigned this Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues related to the API used by Mod Devs bug Functionality which is not working as intended
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant