zhengtao 8 mēneši atpakaļ
vecāks
revīzija
70db87f7ba

+ 7 - 8
components/mongo/component.go

@@ -2,7 +2,6 @@ package mhayaMongo
 
 import (
 	"context"
-	"crypto/tls"
 	"fmt"
 	"time"
 
@@ -94,13 +93,13 @@ func CreateDatabase(uri, dbName string, timeout ...time.Duration) (*mongo.Databa
 	if len(timeout) > 0 && timeout[0].Seconds() > 3 {
 		tt = timeout[0]
 	}
-	tlsConfig := &tls.Config{
-		MinVersion:               tls.VersionTLS12,
-		PreferServerCipherSuites: true,
-	}
-	o := options.Client().ApplyURI(uri).SetTLSConfig(tlsConfig)
-
-	//o := options.Client().ApplyURI(uri)
+	/*	tlsConfig := &tls.Config{
+			MinVersion:               tls.VersionTLS12,
+			PreferServerCipherSuites: true,
+		}
+		o := options.Client().ApplyURI(uri).SetTLSConfig(tlsConfig)
+	*/
+	o := options.Client().ApplyURI(uri)
 	if err := o.Validate(); err != nil {
 		return nil, err
 	}

+ 6 - 7
game/game_cluster/internal/mdb/component.go

@@ -1,7 +1,6 @@
 package mdb
 
 import (
-	"crypto/tls"
 	"github.com/go-redis/redis/v8"
 	mhayaMongo "github.com/mhaya/components/mongo"
 	clog "github.com/mhaya/logger"
@@ -37,15 +36,15 @@ func (p *ActorDB) OnInit() {
 		clog.Panic("game_db_id not found")
 	}
 	redisConfig := cprofile.GetConfig("redis")
-	tlsConfig := &tls.Config{
+	/*	tlsConfig := &tls.Config{
 		MinVersion:               tls.VersionTLS12,
 		PreferServerCipherSuites: true,
-	}
+	}*/
 	RDB = redis.NewUniversalClient(&redis.UniversalOptions{
-		Addrs:     []string{redisConfig.GetString("address")},
-		Password:  redisConfig.GetString("password"),
-		DB:        redisConfig.GetInt("db"),
-		TLSConfig: tlsConfig,
+		Addrs:    []string{redisConfig.GetString("address")},
+		Password: redisConfig.GetString("password"),
+		DB:       redisConfig.GetInt("db"),
+		//TLSConfig: tlsConfig,
 	})
 
 	if p.App().NodeId() == "m-center" {