-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Replace the code that fails to send a message with code that logs an error and then closes the WebSocket and starts afresh.
Once we get the following warning, the app will never recover.
WARN front-ends/web/src/lobby.rs:2497 02/14 05:27:54.950 MST In PendingLogin(LoggingIn { nick_candidate: NickPrefix(Ok(Nick("deadhead"))), password: Password(REDACTED) }), not sending Login(LoginRequest(PlayerHashedPassword(Nick("deadhead"), HashedPassword(REDACTED))), false)
The solution is to close and reopen the WebSocket and start from scratch, probably bumping some sort of counter that will cause the client to send an error to the server if it happens more than N times in some small amount of time. IOW, I believe that reopening the WebSocket will work in > 99% of the cases, but we don't want to let the super obscure edge case go undetected.
This is the general case as #1772, however, I fixed a specific instance of a bug that was Tauri specific (and hence only biting me) and am closing #1772. It's not clear that this particular code will ever get hit in the absence of another bug, bug it's fairly clear that once we stop sending messages, we're basically doomed, so we shouldn't stop sending messages.