Skip to content

Add attempts to reconnect to the service when not connected#1032

Merged
Amarcolina merged 2 commits intorelease-4.4.0from
reconnection-robustness
May 14, 2018
Merged

Add attempts to reconnect to the service when not connected#1032
Amarcolina merged 2 commits intorelease-4.4.0from
reconnection-robustness

Conversation

@jselstad
Copy link
Copy Markdown
Contributor

This PR attempts to solve the sporadic issue that sometimes occurs where users will client applications will spuriously not receive hands; we suspect it's caused by the service not acknowledging the connection attempt by the app the first time, so we attempt to simulate an "app restart" by destroying and recreating the controller object.

You can easily test whether doing this could break working apps by adding && !Input.GetKey(KeyCode.Space) to the service connection check on line 506 and holding down Space for several seconds (to artificially induce a "Destroy/Create" cycle).

This PR attempts to solve the sporadic issue that sometimes occurs where users will client applications will spuriously not receive hands; we suspect it's caused by the service not acknowledging the connection attempt by the app the first time, so we attempt to simulate an "app restart" by destroying and recreating the controller object.

You can easily test whether doing this could break working apps by adding ` && !Input.GetKey(KeyCode.Space)` to the service connection check on line 506 and holding down Space for several seconds (to artificially induce a "Destroy/Create" cycle).

Co-Authored-By: Nicholas Benson <nickjbenson@users.noreply.github.com>
@jselstad jselstad added the bug label May 12, 2018
@jselstad jselstad added this to the Core v4.4 milestone May 12, 2018
@jselstad jselstad requested a review from Amarcolina May 12, 2018 01:11
@Amarcolina
Copy link
Copy Markdown
Contributor

do we want to reset _numberOfReconnectionAttempts if the service connects again?
i also might argue that we should never stop retrying
if the device is unplugged for X seconds, we could 'use up' all our retries before it even matters

@Amarcolina Amarcolina merged commit 31d2242 into release-4.4.0 May 14, 2018
@Amarcolina Amarcolina deleted the reconnection-robustness branch May 14, 2018 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants