-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Rework connect saga to support connectivity status and reconnection #1649
Rework connect saga to support connectivity status and reconnection #1649
Conversation
Pull Request Test Coverage Report for Build 888
💛 - Coveralls |
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.
Looks good. I mostly just have questions, but a couple of suggestions as well.
@@ -94,7 +95,7 @@ export default class extends React.Component { | |||
domain, | |||
fetch, | |||
token: directLineToken, | |||
webSocket: webSocket === 'true' || +webSocket | |||
webSocket: webSocket === 'true' || !!+webSocket |
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.
Could just be Boolean(webSocket)
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.
Today, it is either ?ws=true
, ?ws=0
or ?ws=1
. Otherwise, if we are treating it as boolean, I think we could just do webSocket !== 'false'
(non-true
/false
, will by default turns to 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.
I specifically mean !!+webSocket
can be Boolean(webSocket)
99888fb
to
2e64d55
Compare
000730e
to
c3c02dd
Compare
Today, we do not support failed to connect initially and interrupted connection. Both features are also not supported in DLJS currently. In addition, we also do not support abort before a connection is made.
This PR will enable those scenarios. And we will work on support from DLJS side.
Changelog
Changed
core
: Reworked logic on connect/disconnect for reliability on handling corner cases, by @compulim in PR #1649