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

Provide option to retry client connection indefinitely #94

Closed
isaacgr opened this issue Aug 22, 2021 · 0 comments · Fixed by #95
Closed

Provide option to retry client connection indefinitely #94

isaacgr opened this issue Aug 22, 2021 · 0 comments · Fixed by #95
Assignees
Labels
bug Something isn't working

Comments

@isaacgr
Copy link
Owner

isaacgr commented Aug 22, 2021

this.factory.remainingRetries -= 1;

The client should have an option to retry the connection indefinitely. Often there are times where you want the client to continuously attempt to connect until the server is available, and currently the only way to really do this is provide some very high integer for the number of retries.

@isaacgr isaacgr added the bug Something isn't working label Aug 22, 2021
@isaacgr isaacgr self-assigned this Aug 22, 2021
isaacgr added a commit that referenced this issue Aug 22, 2021
- with infinite retries this was not being cancelled in the back.
- Refs #94
@isaacgr isaacgr linked a pull request Aug 22, 2021 that will close this issue
isaacgr added a commit that referenced this issue Aug 22, 2021
- seperate method for handling connection retry attempts
- seperate method for handling socket errors
isaacgr added a commit that referenced this issue Aug 24, 2021
* Update docs to include new retry syntax. Refs #94.

* Retry connection to server indefinitely if retries is set to null. Refs #94.

* Clear connection timeout function when connection is ended.
    - with infinite retries this was not being cancelled in the back.

* Add test for infinite retries. Refs #94.

* Breakout connect() method into seperate functions. Refs #94.
    - seperate method for handling connection retry attempts
    - seperate method for handling socket errors

* Add test for clearing timeout for connection retry. Refs #94.

* Add indefinite retry logic to websocket client

* Add ws client tests for indefinite retry

* Test _idleTimeout value for timer since node v10.x doesnt set destroyed to true

* Allow 90 char max line length.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant