-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Store and forward #2423
Store and forward #2423
Conversation
1) Make credentials dynamic, so that registration changes are reflected in existing service threads. 2) Dedicate a single thread to websocket message retrieval, rather than using an executor. Wrap the whole thing in catch blocks, so that okhttp's internal problems don't take out our thread.
private static class GcmRegistrationId { | ||
private String gcmRegistrationId; | ||
private boolean webSocketChannel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't look like it's used anywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a JSON POJO. It's transmitted to the server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not do private boolean webSocketChannel = true;
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really how json pojos are written, and i want to be explicit to the caller
updated the copyright header and indentation |
|
||
try { | ||
if (isTextSecureEnvelope(request)) { | ||
TextSecureEnvelope envelope = new TextSecureEnvelope(request.getBody().toByteArray(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since body is optional in the protobuf, could someone just send an envelope without one and cause NPE here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"someone" here is the server, which i'm willing to trust with an npe
haven't run it yet, but code lgtm :) |
No description provided.