fix: patch protomux to use the buffers arraybuffer byteLength
This commit is contained in:
parent
12cb3a3b5e
commit
dcad699ae1
|
@ -1,5 +1,5 @@
|
|||
diff --git a/node_modules/protomux/index.js b/node_modules/protomux/index.js
|
||||
index 07bf0ad..c8db59c 100644
|
||||
index 07bf0ad..ef91c72 100644
|
||||
--- a/node_modules/protomux/index.js
|
||||
+++ b/node_modules/protomux/index.js
|
||||
@@ -195,34 +195,34 @@ class Channel {
|
||||
|
@ -43,3 +43,12 @@ index 07bf0ad..c8db59c 100644
|
|||
|
||||
mux.drained = mux.stream.write(state.buffer)
|
||||
|
||||
@@ -417,7 +417,7 @@ module.exports = class Protomux {
|
||||
|
||||
_ondata (buffer) {
|
||||
try {
|
||||
- const state = { buffer, start: 0, end: buffer.byteLength }
|
||||
+ const state = { buffer, start: 0, end: buffer.buffer.byteLength }
|
||||
this._decode(c.uint.decode(state), state)
|
||||
} catch (err) {
|
||||
this._safeDestroy(err)
|
||||
|
|
Loading…
Reference in New Issue