fix(tracker): finaliseBatch for over-beaconSized messages
This commit is contained in:
parent
19872ee11d
commit
9e2839a5e4
1 changed files with 3 additions and 1 deletions
|
|
@ -117,11 +117,13 @@ export default class BatchWriter {
|
|||
if (this.writeWithSize(message)) {
|
||||
return
|
||||
}
|
||||
// buffer is too small. Create one with maximal capacity
|
||||
// buffer is too small. Creating one with maximal capacity for this message only
|
||||
this.encoder = new MessageEncoder(this.beaconSizeLimit)
|
||||
this.prepare()
|
||||
if (!this.writeWithSize(message)) {
|
||||
console.warn('OpenReplay: beacon size overflow. Skipping large message.', message, this)
|
||||
} else {
|
||||
this.finaliseBatch()
|
||||
}
|
||||
// reset encoder to normal size
|
||||
this.encoder = new MessageEncoder(this.beaconSize)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue