diff --git a/Cargo.lock b/Cargo.lock index 8593df9..b521068 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -683,7 +683,7 @@ dependencies = [ [[package]] name = "epoxy-client" -version = "2.1.7" +version = "2.1.8" dependencies = [ "async-compression", "async-trait", diff --git a/client/Cargo.toml b/client/Cargo.toml index 316160b..5ef89ac 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "epoxy-client" -version = "2.1.7" +version = "2.1.8" edition = "2021" [lib] diff --git a/client/package.json b/client/package.json index 448575a..6484abd 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "@mercuryworkshop/epoxy-tls", - "version": "2.1.7-1", + "version": "2.1.8-1", "description": "A wasm library for using raw encrypted tls/ssl/tcp/udp/https/websocket streams on the browser", "scripts": { "build": "./build.sh" diff --git a/client/src/lib.rs b/client/src/lib.rs index 2952289..20349c8 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -635,7 +635,7 @@ impl EpoxyClient { } else { let response_stream = if !is_null_body(response.status().as_u16()) { let response_body = IncomingBody::new(response.into_body()).into_async_read(); - Some(asyncread_to_readablestream(Box::pin(response_body))) + Some(asyncread_to_readablestream(Box::pin(response_body), self.buffer_size)) } else { None }; diff --git a/client/src/utils.rs b/client/src/utils.rs index b2ad1e7..4a5ad86 100644 --- a/client/src/utils.rs +++ b/client/src/utils.rs @@ -459,7 +459,7 @@ export function from_entries(entries){ } async function websocket_connect(url, protocols) { - let wss = new (WebSocketStream ? WebSocketStream : WebSocketStreamPonyfill)(url, { protocols: protocols }); + let wss = new (typeof WebSocketStream !== "undefined" ? WebSocketStream : WebSocketStreamPonyfill)(url, { protocols: protocols }); let {readable, writable} = await wss.opened; return {read: readable, write: writable}; }