Skip to content

Fix bug that leaves dangling connections - #548

Merged
koral-- merged 1 commit into
DeviceFarmer:masterfrom
httptoolkit:fix-dangling-connections
Jul 8, 2026
Merged

koral-- merged 1 commit into
DeviceFarmer:masterfrom
httptoolkit:fix-dangling-connections

Conversation

@pimterry

@pimterry pimterry commented Jul 8, 2026

Copy link
Copy Markdown

Some old ADB servers (before r28.0.1) do not clean up connections after errors. These are more common that you'd think, as it seems they're bundled with various emulators.

In practice, this means that ADB connections can be left open indefinitely, easily resulting in scenarios where large numbers of sockets are used e.g. when polling.

This PR ensure we always kill connections after errors or invalid data - in both cases, the connection is always unusable regardless and is never reused today anyway.

@pimterry
pimterry force-pushed the fix-dangling-connections branch from 0114a5a to c6c70a1 Compare July 8, 2026 11:27
@koral--

koral-- commented Jul 8, 2026 •

Copy link
Copy Markdown
Member

LGTM, could you update your branch? I've just fixed the CI config, so build on semaphore should run w/o issues.

@pimterry
pimterry force-pushed the fix-dangling-connections branch from c6c70a1 to 2dfcbb8 Compare July 8, 2026 12:59
@pimterry

pimterry commented Jul 8, 2026

Copy link
Copy Markdown
Author

@koral-- Updated, seems to be passing now.

@koral--
koral-- merged commit 18eb1b0 into DeviceFarmer:master Jul 8, 2026
1 check passed
@pimterry
pimterry deleted the fix-dangling-connections branch July 8, 2026 13:19
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