mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-04 17:15:58 +08:00
fix: wrap the error of group user and thrid (#2005)
* fix: wrap the error of group user and thrid * fix: del the chinese comment * fix: fix the make_lint error * fix: fix the ApiTest error
This commit is contained in:
@@ -102,12 +102,11 @@ func buildMongoURI(config *config.GlobalConfig) string {
|
||||
maxPoolSize = fmt.Sprint(config.Mongo.MaxPoolSize)
|
||||
}
|
||||
|
||||
uriFormat := "mongodb://%s/%s?maxPoolSize=%s"
|
||||
if username != "" && password != "" {
|
||||
uriFormat = "mongodb://%s:%s@%s/%s?maxPoolSize=%s"
|
||||
return fmt.Sprintf(uriFormat, username, password, address, database, maxPoolSize)
|
||||
|
||||
return fmt.Sprintf("mongodb://%s:%s@%s/%s?maxPoolSize=%s", username, password, address, database, maxPoolSize)
|
||||
}
|
||||
return fmt.Sprintf(uriFormat, address, database, maxPoolSize)
|
||||
return fmt.Sprintf("mongodb://%s/%s?maxPoolSize=%s", address, database, maxPoolSize)
|
||||
}
|
||||
|
||||
func shouldRetry(err error) bool {
|
||||
|
||||
Reference in New Issue
Block a user