Skip to content

Add a tls handshake timeout option. Make reads interruptible in pcntl. - #22

Merged
ChadSikorra merged 2 commits into
mainfrom
upgrade/more-options
Sep 8, 2026
Merged

ChadSikorra merged 2 commits into
mainfrom
upgrade/more-options

Conversation

@ChadSikorra

Copy link
Copy Markdown
Contributor

Two options here related to issues in the LDAP library:

  1. There's currently no timeout related to TLS handshakes. If a client starts one but never completes it we hang on the read timeout. I'm defaulting this to 5s and letting it be configurable. Surprisingly other implementations don't seem to enforce this. But it's important for us to have some kind of timeout since one of the main runners on the LDAP side is a forking based process.
  2. We need a way for reads to be interruptible in PCNTL so that the server process can interrupt it and send a proper notice of disconnect. For a client that is otherwise awaiting a read this doesn't really happen. So this updates it to use stream_select which allows us to actually interrupt and send a proper notice of disconnect instead of force killing clients when the server shuts down or restarts.

@ChadSikorra
ChadSikorra merged commit dd2e389 into main Sep 8, 2026
18 of 20 checks passed
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.72727% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.31%. Comparing base (02ed927) to head (e3f9a0e).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/FreeDSx/Socket/Socket.php 58.00% 21 Missing ⚠️
src/FreeDSx/Socket/HasSocketOptions.php 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #22      +/-   ##
============================================
- Coverage     78.70%   76.31%   -2.39%     
- Complexity      206      224      +18     
============================================
  Files            14       14              
  Lines           648      701      +53     
============================================
+ Hits            510      535      +25     
- Misses          138      166      +28     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant