diff --git a/neo4j/internal/pool/server.go b/neo4j/internal/pool/server.go index 070a442f..3b0b605a 100644 --- a/neo4j/internal/pool/server.go +++ b/neo4j/internal/pool/server.go @@ -76,14 +76,14 @@ func (s *server) healthCheck( if itime.Since(connection.IdleDate()) > idlenessTimeout { connection.ForceReset(ctx) if !connection.IsAlive() { - return false, nil + return false, ctx.Err() } } if err := connection.ReAuth(ctx, auth); err != nil { return false, err } if !connection.IsAlive() { - return false, nil + return false, ctx.Err() } // Update round-robin counter every time we give away a connection and keep track // of our own round-robin index