OpenSSL streams liveness check should be always non blocking
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
Currently all OpenSSL streams use TCP connection. There is no point for liveness check to ever use timeout and it makes the check with and without timeout inconsistent because if it's used without timeout (which is always the case for internal PHP function like php_stream_eof), then it succeed even if no data is read - it fails only if there is an error - this is especially important for non blocking mode. However if it's used with timeout and the timeout expires, it return false. There does not seem much advantage to do that and considering that it is unused and it makes the code significantly more complex, we should remove this handling and always return immediately.
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
Locate the OpenSSL stream liveness-check implementation and inspect how timeout and non-blocking paths are handled. The work is complete when the check returns immediately without timeout handling while preserving the documented behavior for errors and non-blocking streams; identify or run the relevant stream tests if the repository provides them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100