Repository navigation
Fix crashes on empty auth responses and repeated reconnects after sign-in - #379
Open
Keith-wright wants to merge 1 commit into
Open
Keith-wright wants to merge 1 commit into
Keith-wright wants to merge 1 commit into
Conversation
…n-in Gson returns null for a null or empty authorizer response, and the channel and sign-in code called methods on the result, so a NullPointerException escaped on the event thread. Treat a null response as an authorization failure. InternalUser.disconnect() runs on every CONNECTING and DISCONNECTED state change. After the first run cleared the user ID, the server-to-user channel was still marked as subscribed, so the next run called getName() without a user ID and threw. Only unsubscribe while there is a user ID, and mark the channel unsubscribed. Fixes #372 Fixes #367
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes two crashes where an exception escaped on the library's event thread.
It also adds tests for each case.
CHANGELOG