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
Make sure to try to reconnect when request to dispatcher fails #297
Conversation
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.
Is there any test code to test this change?
src/peer/socket.js
Outdated
* Return signaling server url. This attempts trying up to maxNumberOfAttempts times before giving up then throw error. | ||
* @return {String} A string of signaling server url. | ||
*/ | ||
async _getSignalingServerUrlWithRetry() { |
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.
_fetchSignalingServerUrlWithRetry
seems to be better than _getSignalingServerUrlWithRetry
because "get" does not seem to send request to server.
Co-authored-by: y-i <y-i@users.noreply.github.com>
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.
LGTM
Please check the type of change your PR introduces
Summary
There is a bug that a reconnect process to the signaling-server is stopped because the Peer's error event was fired when request to the dispatcher failed.
This PR allows to try to reconnect in such case.
Related Links (Issue, PR etc...) (Optional)
Check point