WebSocket: a signal during a blocking receive closes the connection
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- networking
Research direction
Start in src/net/websocket/websocket.c at read_exact() and compare its recv() handling with the existing EINTR retry in ws_send_all(). The issue identifies the expected behavior: retry when recv() fails with errno == EINTR. Verify that interrupted receives no longer close the connection and that other nonpositive results retain their existing handling.
Written by the indexing model from the issue text.
Description
Location: src/net/websocket/websocket.c, read_exact().
Found by code reading on dev at 04ada5ffa; not reproduced with a running program.
read_exact() returns -1 for any recv() result <= 0, including -1 with errno == EINTR. A signal delivered to the thread blocked in cwist_websocket_receive() (for example a timer or SIGCHLD without SA_RESTART) is treated as a closed connection. The send side (ws_send_all()) already retries on EINTR.
Expected: EINTR is retried.
- Dominant language
- C
- Stars
- 16
- Forks
- 7
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 194
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from c4punks/CWIST
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
389ds/389-ds-base#8157 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
coolsnowwolf/lede#14305 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 2 days