Skip to content

Commit cd4699d

Browse files
committed
adding wireversion range
1 parent a5a13f8 commit cd4699d

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

internal/driverutil/description.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ import (
2020
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/description"
2121
)
2222

23+
const (
24+
MinWireVersion = 6
25+
MaxWireVersion = 25
26+
)
27+
2328
func equalWireVersion(wv1, wv2 *description.VersionRange) bool {
2429
if wv1 == nil && wv2 == nil {
2530
return true

x/mongo/driver/drivertest/opmsg_deployment.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
"go.mongodb.org/mongo-driver/v2/bson"
1515
"go.mongodb.org/mongo-driver/v2/internal/csot"
16+
"go.mongodb.org/mongo-driver/v2/internal/driverutil"
1617
"go.mongodb.org/mongo-driver/v2/mongo/address"
1718
"go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore"
1819
"go.mongodb.org/mongo-driver/v2/x/mongo/driver"
@@ -40,6 +41,9 @@ var (
4041
MaxBatchCount: maxBatchCount,
4142
SessionTimeoutMinutes: &sessionTimeoutMinutes,
4243
Kind: description.ServerKindRSPrimary,
44+
WireVersion: &description.VersionRange{
45+
Max: driverutil.MaxWireVersion,
46+
},
4347
}
4448
)
4549

x/mongo/driver/topology/fsm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var (
2323
MinSupportedMongoDBVersion = "3.6"
2424

2525
// SupportedWireVersions is the range of wire versions supported by the driver.
26-
SupportedWireVersions = driverutil.NewVersionRange(6, 25)
26+
SupportedWireVersions = driverutil.NewVersionRange(driverutil.MinWireVersion, driverutil.MaxWireVersion)
2727
)
2828

2929
type fsm struct {

0 commit comments

Comments
 (0)