mirror of https://github.com/grpc/grpc-go.git
client: add user-friendly error message of LB policy update timed out (#7206)
This commit is contained in:
parent
9d9c1fbd60
commit
0561c78c9d
|
|
@ -20,6 +20,7 @@ package grpc
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"sync"
|
||||
|
||||
|
|
@ -117,7 +118,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.
|
|||
if lastPickErr != nil {
|
||||
errStr = "latest balancer error: " + lastPickErr.Error()
|
||||
} else {
|
||||
errStr = ctx.Err().Error()
|
||||
errStr = fmt.Sprintf("received context error while waiting for new LB policy update: %s", ctx.Err().Error())
|
||||
}
|
||||
switch ctx.Err() {
|
||||
case context.DeadlineExceeded:
|
||||
|
|
|
|||
Loading…
Reference in New Issue