Skip to content

Commit 20c4aca

Browse files
committed
fix corrupt buffer
1 parent 6924ec0 commit 20c4aca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mods/tls.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ export class TlsStream extends AsyncEventTarget {
346346
*/
347347
async #onReadBuffered(chunk: Uint8Array) {
348348
this.#buffer.write(chunk)
349-
const full = this.#buffer.before
349+
const full = new Uint8Array(this.#buffer.before)
350350

351351
this.#buffer.offset = 0
352352
await this.#onReadDirect(full)

0 commit comments

Comments
 (0)