Skip to content

Fix crashes on empty auth responses and repeated reconnects after sign-in - #379

Open
Keith-wright wants to merge 1 commit into
masterfrom
fix-auth-and-signin-crashes
Open

Keith-wright wants to merge 1 commit into
masterfrom
fix-auth-and-signin-crashes

Conversation

@Keith-wright

Copy link
Copy Markdown
Contributor

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

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant