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
LongPoll #814
LongPoll #814
Changes from all commits
c9d4f52
b54d329
ba9d5ec
e935fb7
8e4c629
50a56d6
4099feb
428c373
a32ac24
c379c33
59449c9
8b2b539
6a10060
7a5c799
eb1cb86
dc2b0a7
7df789f
3926056
7818ee1
3c2f056
564aefb
de7e384
ac77ddc
8adcad9
ac4fe43
cb72f7e
e8ef9e3
7035fd7
2dd8dfa
b878e70
8dd4169
813a231
afaa2c4
ac909ab
4268d46
e8462da
8d66397
db18d0a
6d9ff79
88c54b9
6e586b0
08e8429
fd558ab
f5a943c
9021139
020a090
9cc7b2d
13c95b9
840cfbd
7c61d87
7b4ac06
8a989b5
9dbafe3
8229b7d
a7ee9ae
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.
I wonder if we shouldn't remove thhe online check. If you're offline the
this.wsConnection.connect
fails andisWsFailure
will return false anyways. On the other hand, if it could be the case that you have a wsFailure and you're offline, in RN this check wouldn't work, and we would trigger the fallback while offline. I'm not sure if I'm missing something, though. Does it make sense?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.
we did a bad job with naming here but isWSFailure here returns true if you are offline, basically, isWSFailure is in contrast with isAPIFailure. isWSFailure is true when we couldn't reach API for any reason, including network issue
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.
Following up on this: so I just tested on RN. If you access
window.navigator
it looks like following:And thus
isOnline()
function will return alwaysundefined
-> fallback will never be executed. Maybe we can provide a way so that RN SDK can let JS client know about the online status (e.g., we can provide js client with async function to fetch online status).