没解决

This commit is contained in:
suguo.yao 2021-01-23 16:25:55 +08:00
parent 2a0bcdfd5d
commit 8f305a2c85
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ import (
func main() {
consul.FindServer()
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
conn, err := grpc.DialContext(ctx, "consul://192.168.8.254:8500/demo", grpc.WithBlock(), grpc.WithInsecure())
conn, err := grpc.DialContext(ctx, "consul://192.168.8.254:8500/demo", grpc.WithBlock(), grpc.WithInsecure(), grpc.WithBalancerName("round_robin"))
if err != nil {
cancel()
}