mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-04 03:12:19 +08:00
feat: remove checkServiceHealth
This commit is contained in:
parent
d96d5ecbc1
commit
7291a10564
@ -8,8 +8,6 @@ import (
|
|||||||
config2 "github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
config2 "github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/credentials/insecure"
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
"net"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type ServiceAddresses map[string][]int
|
type ServiceAddresses map[string][]int
|
||||||
@ -154,11 +152,3 @@ func (cd *ConnDirect) dialServiceWithoutResolver(ctx context.Context, address st
|
|||||||
}
|
}
|
||||||
return conn, nil
|
return conn, nil
|
||||||
}
|
}
|
||||||
func checkServiceHealth(address string) bool {
|
|
||||||
conn, err := net.DialTimeout("tcp", address, time.Second*3)
|
|
||||||
if err != nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
conn.Close()
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user