mirror of
https://github.com/denoland/deno.git
synced 2024-11-27 16:10:57 -05:00
fix(zlib): handle no flush flag in handle_.write (#21432)
Fixes https://github.com/denoland/deno/issues/21096
This commit is contained in:
parent
10ab8c1ef1
commit
38002ffdd7
2 changed files with 16 additions and 1 deletions
|
@ -81,3 +81,18 @@ Deno.test(
|
||||||
await promise;
|
await promise;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Deno.test(
|
||||||
|
"zlib flush i32",
|
||||||
|
// FIXME: Handle is not closed properly
|
||||||
|
{ sanitizeResources: false },
|
||||||
|
function () {
|
||||||
|
const handle = createDeflate({
|
||||||
|
// @ts-expect-error: passing non-int flush value
|
||||||
|
flush: "",
|
||||||
|
});
|
||||||
|
|
||||||
|
handle.end();
|
||||||
|
handle.destroy();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
|
@ -120,7 +120,7 @@ class Zlib {
|
||||||
core.opAsync(
|
core.opAsync(
|
||||||
"op_zlib_write_async",
|
"op_zlib_write_async",
|
||||||
this.#handle,
|
this.#handle,
|
||||||
flush,
|
flush ?? Z_NO_FLUSH,
|
||||||
input,
|
input,
|
||||||
in_off,
|
in_off,
|
||||||
in_len,
|
in_len,
|
||||||
|
|
Loading…
Reference in a new issue