lukeed / lukeed/sockette

Re-connection Strategy

Open
#2 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

maybe
Dominant language
JavaScript
Stars
2.5k
Forks
79
PR merge metrics
No merged PRs in 30d

Description

Awesome Library.

I was taking a look at the re-connection handler and noticed it just takes a static delay before attempting to reconnect.

I usually like to use some form of re-connection strategy to control how a re-connection occurs for example an [Exponential Back-off](https://en.wikipedia.org/wiki/Exponential_backoff).

Would this be a suitable feature addition?

To keep the module size down the constructor could take a function:

```
new Sockette(..., {
reconnection: (attempts, maxAttempts) => Number
});
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the reconnection handler and constructor options described in the issue, then review the existing comment discussion for an agreed design. Work is complete when the project accepts and documents a reconnection strategy without breaking existing behavior, with tests covering the resulting attempts and delays.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.