Skip to content
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

cli: fix decompression loop stalling #191512

Merged
merged 1 commit into from
Aug 28, 2023
Merged

cli: fix decompression loop stalling #191512

merged 1 commit into from
Aug 28, 2023

Conversation

connor4312
Copy link
Member

Fixes #191501

It turns out this was a difference in inflate/deflate implementations
between the extension/SDK and the CLI. The SDK uses Node's zlib bindings,
while by default Rust's flate2 library uses a rust port of miniz.
The 'logic' in the CLI was good, but miniz does not appear to flush
decompressed data as nicely on SYNC'd boundaries as zlib does, which
caused data to 'stall'. Telling the flate2 crate to use the native
bindings fixed this.

This could also be the cause of the flakiness occasionally seen on idle
tunnel connections!

@connor4312 connor4312 enabled auto-merge (squash) August 28, 2023 19:34
@connor4312 connor4312 self-assigned this Aug 28, 2023
Fixes #191501

It turns out this was a difference in inflate/deflate implementations
between the extension/SDK and the CLI. The SDK uses Node's zlib bindings,
while by default Rust's flate2 library uses a rust port of [miniz][1].
The 'logic' in the CLI was good, but miniz does not appear to flush
decompressed data as nicely on SYNC'd boundaries as zlib does, which
caused data to 'stall'. Telling the flate2 crate to use the native
bindings fixed this.

This could also be the cause of the flakiness occasionally seen on idle
tunnel connections!

[1]: https://github.com/richgel999/miniz
@connor4312 connor4312 force-pushed the connor4312/issue191501 branch from d9f9467 to bf516e2 Compare August 28, 2023 19:35
@vscodenpa vscodenpa added this to the August 2023 milestone Aug 28, 2023
@connor4312 connor4312 merged commit db135a5 into main Aug 28, 2023
@connor4312 connor4312 deleted the connor4312/issue191501 branch August 28, 2023 19:51
@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

exec server port forwarding fails for certain cases
3 participants