bufferevent_replacefd close socket when bufferevent‘s socket fd is eq new fd
Open
Nobody has claimed this yet.
status:unconfirmed
type:q
- Dominant language
- C
- Stars
- 12k
- Forks
- 3.5k
- Avg merge
- 12h 55m
- Merged PRs (30d)
- 6
Description
in function
int
bufferevent_replacefd(struct bufferevent *bev, evutil_socket_t fd)
line 896
only check
if (old_fd != EVUTIL_INVALID_SOCKET)
but not check
fd is eq old_fd
Contributor guide
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
Start in bufferevent_replacefd(struct bufferevent *bev, evutil_socket_t fd), around line 896, and trace how the existing socket descriptor is handled. Verify the behavior when fd equals the current descriptor, then confirm that replacing with the same descriptor does not close the socket.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100