Skip to content
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

Merged
merged 13 commits into from Jan 18, 2021

Conversation

d-matsui
Copy link
Contributor

@d-matsui d-matsui commented Jan 7, 2021

Please check the type of change your PR introduces

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes
  • Other (please describe):

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

  • Check merge target branch
  • ( For SkyWay team ) This is public repository Please Check AGAIN before publish

@d-matsui d-matsui requested review from a team and removed request for a team January 7, 2021 07:42
@d-matsui d-matsui changed the title Make sure to try to reconnect when request to dispatcher fails [DO NOT MERGE] Make sure to try to reconnect when request to dispatcher fails Jan 7, 2021
@d-matsui d-matsui changed the title [DO NOT MERGE] Make sure to try to reconnect when request to dispatcher fails Make sure to try to reconnect when request to dispatcher fails Jan 8, 2021
@d-matsui d-matsui requested review from a team, y-i and riosu and removed request for a team January 8, 2021 01:22
riosu
riosu previously approved these changes Jan 12, 2021
Copy link
Contributor

@y-i y-i left a 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?

@d-matsui d-matsui changed the title Make sure to try to reconnect when request to dispatcher fails [DO NOT MERGE] Make sure to try to reconnect when request to dispatcher fails Jan 17, 2021
@d-matsui d-matsui changed the title [DO NOT MERGE] Make sure to try to reconnect when request to dispatcher fails Make sure to try to reconnect when request to dispatcher fails Jan 18, 2021
tests/peer/socket.js Outdated Show resolved Hide resolved
* 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() {
Copy link
Contributor

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.

riosu
riosu previously approved these changes Jan 18, 2021
Co-authored-by: y-i <y-i@users.noreply.github.com>
@d-matsui d-matsui requested review from y-i and riosu January 18, 2021 04:49
Copy link
Contributor

@y-i y-i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@y-i y-i merged commit 1e6d861 into staging Jan 18, 2021
@y-i y-i deleted the dev/socket-reconnect branch January 18, 2021 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants