Skip to content

feat(server): Improve HTTP Connection Abort Handling #3112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025

Conversation

sachaarbonel
Copy link
Contributor

Changes

  • Replaced static abort flags with direct HTTP connection state checking
  • Added proper handling of client disconnections during audio processing
  • Implemented HTTP status code 499 (Client Closed Request) for client disconnects
  • Added HTTP status code 500 for internal server errors

Technical Details

  • Removed redundant encoder_begin_callback and simplified abort mechanism
  • Added direct integration with httplib's connection state tracking
  • Improved error handling and status code reporting
  • Eliminated potential data races from static abort flags

Impact

This change improves the server's ability to handle client disconnections gracefully and provides more accurate HTTP status codes for different error scenarios.

@danbev danbev merged commit bcf1ed0 into ggml-org:master May 5, 2025
52 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.

2 participants