Skip to content

Commit a837e41

Browse files
committed
[CLIENT-3894] Setting user-agent allows a closed connection to return for tend
Also retracts the client versions with that bug.
1 parent 3c878be commit a837e41

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

go.mod

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ require (
2424
golang.org/x/tools v0.31.0 // indirect
2525
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
2626
)
27+
28+
retract (
29+
[v8.3.0, v8.4.1] // Problem with User Agent code returning a closed connection without an error.
30+
)

node.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,12 +527,11 @@ func (nd *Node) newTendConnection() (*Connection, Error) {
527527
return nil, err
528528
}
529529

530-
serverMinVersion, _ := version.Parse("8.1.0.0")
530+
serverMinVersion := &version.Version{Major: 8, Minor: 1, Patch: 0, Build: 0}
531531
if nd.version.IsGreaterOrEqual(serverMinVersion) {
532532
if err := nd.sendUserAgentId(conn); err != nil {
533-
// If setting user agent failed, we still return the connection
534-
// as it is already authenticated and usable.
535533
logger.Logger.Warn("Error setting user agent for node %s: %s", nd.String(), err.Error())
534+
return nil, err
536535
}
537536
}
538537

0 commit comments

Comments
 (0)