About "Once it has been called, the function refuses any other connections"
- Dominant language
- No language data
- Stars
- 253
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
The README.md in this repo says
> Once it has been called, the function refuses any other connections. Once it has responded, the function closes the socket and quits immediately.
The current code tries to implement this behavior by setting "backlog" to 1 in `listen(2)`.
However, it does not work as expected.
## Expected behavior
It should "refuse" the second connection (i.e. send TCP RST to the client)
## Actual behavior
It just "ignore"s the second connection (i.e. stop responding to TCP SYN from the client)
- - -
So I suggest just closing the listener socket rather than setting "backlog" to 1.
Please see also: http://www.perlmonks.org/?node_id=940662
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading README.md and locating the listener setup that uses listen(2) with backlog 1. Reproduce the behavior with a second TCP connection, then verify that the listener no longer accepts or leaves that connection waiting and that the documented single-connection lifecycle is preserved.
Written by the indexing model from the issue text.
Assessment
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100