Skip to content

Commit c58b503

Browse files
committed
GODRIVER-3858 message size exceeds limit of 48000000
1 parent 908a3ef commit c58b503

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

x/mongo/driver/batches.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (b *Batches) AppendBatchSequence(dst []byte, maxCount, totalSize int) (int,
3939
idx, dst = bsoncore.ReserveLength(dst)
4040
dst = append(dst, b.Identifier...)
4141
dst = append(dst, 0x00)
42-
var size int
42+
size := len(dst)
4343
var n int
4444
for i := b.offset; i < len(b.Documents); i++ {
4545
if n == maxCount {
@@ -69,7 +69,7 @@ func (b *Batches) AppendBatchArray(dst []byte, maxCount, totalSize int) (int, []
6969
}
7070
l := len(dst)
7171
aidx, dst := bsoncore.AppendArrayElementStart(dst, b.Identifier)
72-
var size int
72+
size := len(dst)
7373
var n int
7474
for i := b.offset; i < len(b.Documents); i++ {
7575
if n == maxCount {

0 commit comments

Comments
 (0)