-
Notifications
You must be signed in to change notification settings - Fork 477
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
Bug/msg session reconnect #2193
Conversation
.promise(); | ||
endpointUrl = endpoint.Endpoint.Url; | ||
} catch (e) { | ||
const closeEvent = new CloseEvent('close', { |
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 you print the error here before creating the CloseEvent?
this.logger.error(${error});
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 already logged when handled in the closeEventHandler
this.logger.info(`WebSocket close: ${event.code} ${event.reason}`);
so don't think duplicate logging is needed 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.
Yeah, but the reason is logged, not sure if error
can be something different hence suggested.
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.
Also, good solution I think.
* Messaging Session reconnects on failures to fetch messaging session endpoint Co-authored-by: David Witherspoon <[email protected]> Co-authored-by: Venkatesh Devale <[email protected]>
Issue #:
Description of changes:
Fix issue with recent change to getMessagingSessionEndpoint resolve on connect where it would not reconnect if getMessagingSessionEndpoint failed.
Testing:
Can these tested using a demo application? Please provide reproducible step-by-step instructions.
Start the messaging demo app in browser. Create app instance user. Connect. Disconnect wifi, reconnect, and see websocket get establish
Checklist:
Have you successfully run
npm run build:release
locally?yes
Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved?
yes
Do you change the wire protocol, e.g. the request method? If yes, has that been reviewed and approved?
yes
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.