Skip to content

Commit

Permalink
Fix end bundle bundle_delimiter packet not being emitted (#1248)
Browse files Browse the repository at this point in the history
  • Loading branch information
PondWader authored Jul 29, 2023
1 parent 94b9c22 commit 35b2aa5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ class Client extends EventEmitter {
debug(s && s.length > 10000 ? parsed.data : s)
}
if (parsed.metadata.name === 'bundle_delimiter') {
if (this._mcBundle.length) {
if (this._mcBundle.length) { // End bundle
this._mcBundle.forEach(emitPacket)
emitPacket(parsed)
this._mcBundle = []
} else { // Start bundle
this._mcBundle.push(parsed)
Expand Down

0 comments on commit 35b2aa5

Please sign in to comment.