File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ to create _a_ connection which may need to be recreated if it is lost.
30
30
31
31
` grpc.Dial ` uses "passthrough" as the default name resolver for backward
32
32
compatibility while ` grpc.NewClient ` uses "dns" as its default name resolver.
33
- This subtle diffrence is important to legacy systems that also specified a
33
+ This subtle difference is important to legacy systems that also specified a
34
34
custom dialer and expected it to receive the target string directly.
35
35
36
36
For these reasons, using ` grpc.Dial ` is discouraged. Even though it is marked
@@ -62,10 +62,10 @@ the RPC was sent to a server.
62
62
63
63
Some users of ` Dial ` use it as a way to validate the configuration of their
64
64
system. If you wish to maintain this behavior but migrate to ` NewClient ` , you
65
- can call ` State ` and ` WaitForStateChange ` until the channel is connected.
66
- However, if this fails, it does not mean that your configuration was bad - it
67
- could also mean the service is not reachable by the client due to connectivity
68
- reasons.
65
+ can call ` GetState ` , then ` Connect ` if the state is ` Idle ` and
66
+ ` WaitForStateChange ` until the channel is connected. However, if this fails,
67
+ it does not mean that your configuration was bad - it could also mean the
68
+ service is not reachable by the client due to connectivity reasons.
69
69
70
70
## Best practices for error handling in gRPC
71
71
You can’t perform that action at this time.
0 commit comments