File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 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.
3030
3131` grpc.Dial ` uses "passthrough" as the default name resolver for backward
3232compatibility 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
3434custom dialer and expected it to receive the target string directly.
3535
3636For these reasons, using ` grpc.Dial ` is discouraged. Even though it is marked
@@ -62,10 +62,10 @@ the RPC was sent to a server.
6262
6363Some users of ` Dial ` use it as a way to validate the configuration of their
6464system. 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.
6969
7070## Best practices for error handling in gRPC
7171
You can’t perform that action at this time.
0 commit comments