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.
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
Protocol 2.0 #842
Protocol 2.0 #842
Changes from 36 commits
bd1993d
131fd6e
7d21386
49bfde9
d347a2c
8ad9623
63d7f04
8d9d772
46b2567
e994379
3f102b9
014fc38
7ae2fe7
c6b2c64
8a4e8e7
6d27773
761a572
52eee30
c2d5fab
4773476
bdcc5e0
ed019ed
7297b00
0e705a5
271794b
f3d0dd7
1658a2f
486ff01
f62ebc7
bfd621d
429ff78
2dba619
fe8ed2c
ce44c37
602a223
73ced2d
4221b80
0287b17
9376960
201f388
86625b8
fc543d0
b4eaadd
e91d770
a6eeb00
4591971
5fae005
d1e262d
4dd11ee
52e06b3
90dd275
a6fd26d
1b5781a
0fa91f7
52884b5
28f438a
dc5ed8c
18415fc
ee0dcd7
5b99907
d022c3d
d7ed41a
f0e09fb
865bca8
e079abb
bd5a540
437bb08
28531da
7752068
49f8d6a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
with
It's not obvious that that change is correct (won't it have a possibly-stale connectionId?)
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.
I guess I misinterpreted RTP17g.
Is this a good implementation 28531da?
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.
Please use proper logging for this, instead of
e.printStackTrace()
. Currently,java-sdk
is being used on different platforms, so it won't really work there as expected. e.g. androidThere 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 true for all
e.printStackTrace();
statements in the code.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.
You can check with @SimonWoolf on this, how to log errors. I think most likely errors are supposed to be passed back to the user who is calling the code so they can be handled gracefully, otherwise logged with proper logging level.
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.
RTP17e:
If the publish attempt fails for an automatic presence @ENTER@ (for example, by Ably rejecting it with a @NACK@), an @UPDATE@ event should be emitted on the channel with @resumed@ set to true and @reason@ set to an @ErrorInfo@ object with @code@ @91004@, a @message@ indicating that an automatic re-enter has failed and indicating the @clientId@, and @cause@ set to the reason for the enter failure. The error should also be logged at @warn@ level or higher.
As usual you don't need to reinvent the wheel here, look at what the library already does in equivalent situations. Look a little further up this same file to endSyncAndEmitLeaves():
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.
Speaking of endSyncAndEmitLeaves, it... is still there, still implements the old auto-re-entry logic (RTP17c)? The conditions on when to auto-re-enter changed, but instead of changing the existing implementation you've just added the new one right next to the old, so now it's doing both?
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.
@sacOO7 Logs are fixed here 5b99907
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.
Thanks, I will take a look !
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.
Added more comments
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.
@sacOO7 I think this is it d022c3d
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.
@SimonWoolf I have removed old implementation of re-enter as I already implemented the new logic in separate function reEnter() by spec RTP17g.
You can check it here f0e09fb