Skip to content

Fix graceful shutdown - #252

Merged
swhitty merged 1 commit into
mainfrom
fix-graceful-shutdown
Nov 8, 2026
Merged

swhitty merged 1 commit into
mainfrom
fix-graceful-shutdown

Conversation

@swhitty

@swhitty swhitty commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

AsyncSocket.close() is now async and removes socket from pool resuming waiting suspensions.
fixes #251

Similar to the solution offered by @lhoward in #250

Graceful shutdown of HTTPServer.stop() now ends immediately after all connections are drained and the listening socket is closed.

AsyncSocket.close now removes socket from pool
@codecov

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.74%. Comparing base (6245651) to head (f8f5701).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
FlyingFox/Sources/HTTPServer.swift 87.50% 2 Missing ⚠️
FlyingSocks/Sources/AsyncSocket.swift 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #252      +/-   ##
==========================================
- Coverage   93.79%   93.74%   -0.06%     
==========================================
  Files          72       72              
  Lines        3820     3837      +17     
==========================================
+ Hits         3583     3597      +14     
- Misses        237      240       +3     

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

@swhitty
swhitty merged commit 440c520 into main Nov 8, 2026
24 of 26 checks passed
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.

HTTPServer.stop(timeout:) always times out

1 participant