fix: avoid retaining responses for every abandoned session - #1282
Merged
Merged
Conversation
KazuCocoa
marked this pull request as ready for review
September 29, 2026 05:13
|
@KazuCocoa Could you please also backport the HTTP server fixes to mac2 driver after they are approved and merged? |
mykola-mokhnach
approved these changes
Sep 29, 2026
github-actions Bot
pushed a commit
that referenced
this pull request
Sep 30, 2026
## [16.13.3](v16.13.2...v16.13.3) (2026-09-30) ### Bug Fixes * reject stale sessions without retaining past responses ([#1282](#1282)) ([f245ffb](f245ffb))
|
🎉 This PR is included in version 16.13.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The HTTP server retains every abandoned session UUID and response for its entire lifetime. Repeated session creation and deletion therefore grows retained memory without a bound.
Check session admission against the current active session under the pending-request lock and construct the normal invalid-session response for stale IDs. Remove the historical response dictionary while preserving pending-request abandonment. Tests cover stale IDs, live sessions, and release of responses after many abandoned IDs.
Validation: all 178 native unit tests passed on an iOS 26.5 simulator using a local integration branch containing this review series. The regression tests are included in this PR. Native changes were built with Xcode 27.1. This intentionally returns the standard invalid-session response for new requests to old sessions, rather than retaining and replaying each historical response.