mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-23 18:00:32 +08:00
new_815
Signed-off-by: hanzhixiao <709674996@qq.com>
This commit is contained in:
parent
5a5259ad6c
commit
00f179450b
@ -193,13 +193,17 @@ func checkMinio() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cancel, err := minioClient.HealthCheck(time.Duration(minioHealthCheckDuration) * time.Second)
|
cancel, err := minioClient.HealthCheck(time.Duration(minioHealthCheckDuration) * time.Second)
|
||||||
|
defer func() {
|
||||||
|
if cancel != nil {
|
||||||
|
cancel()
|
||||||
|
}
|
||||||
|
}()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
} else {
|
} else {
|
||||||
if minioClient.IsOffline() {
|
if minioClient.IsOffline() {
|
||||||
return ErrComponentStart.Wrap("Minio server is offline")
|
return ErrComponentStart.Wrap("Minio server is offline")
|
||||||
}
|
}
|
||||||
cancel()
|
|
||||||
}
|
}
|
||||||
if exactIP(config.Config.Object.ApiURL) == "127.0.0.1" || exactIP(config.Config.Object.Minio.Endpoint) == "127.0.0.1" {
|
if exactIP(config.Config.Object.ApiURL) == "127.0.0.1" || exactIP(config.Config.Object.Minio.Endpoint) == "127.0.0.1" {
|
||||||
return ErrConfig.Wrap("apiURL or Minio endpoint contain 127.0.0.1.")
|
return ErrConfig.Wrap("apiURL or Minio endpoint contain 127.0.0.1.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user