failing test

This commit is contained in:
Mathias Buus 2023-01-13 13:40:19 +01:00
parent b9ff6b50b7
commit 78e83bbfa9
1 changed files with 4 additions and 2 deletions

View File

@ -489,8 +489,9 @@ module.exports = class Protomux {
remoteId = c.uint.decode(state)
continue
}
state.end = state.start + end
state.end = state.start + len
this._decode(remoteId, state)
state.start = state.end
state.end = end
}
}
@ -535,7 +536,8 @@ module.exports = class Protomux {
return
}
this._remote[rid] = { state, pending: [], session: null }
const copyState = { buffer: state.buffer, start: state.start, end: state.end }
this._remote[rid] = { state: copyState, pending: [], session: null }
if (++this._remoteBacklog > MAX_BACKLOG) {
throw new Error('Remote exceeded backlog')