Reap/Close old connections when max connection count is hit
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Due to firefox tabs continually crashing on me, I quickly hit the 5 connection count cap (https://github.com/destinygg/chat/blob/master/connection.go#L138).
Rather than outright rejecting new connections, would it make sense to close old connections (resetting to 0) and allowing new connections?
I'd be perfectly willing to put in a patch/PR should anyone have any input on this.
ian@home ~ $ netstat | awk '/destiny/' tcp 0 0 192.168.1.4:53654 destiny.gg:https ESTABLISHED tcp 0 0 192.168.1.4:54422 destiny.gg:https ESTABLISHED tcp 0 0 192.168.1.4:54232 destiny.gg:https ESTABLISHED tcp 0 0 192.168.1.4:54588 destiny.gg:https ESTABLISHED tcp 0 0 192.168.1.4:53466 destiny.gg:https ESTABLISHED
I believe @SoMuchForSubtlety is having this issue
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect connection.go around line 138 and trace how the connection count and lifecycle are managed. Reproduce the five-connection case, then define and verify the behavior for closing an old connection and accepting a new one when the cap is reached.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100