Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of deprecated methods. #4076

Merged
merged 1 commit into from Sep 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion x/x.go
Expand Up @@ -46,6 +46,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/encoding/gzip"
"google.golang.org/grpc/status"
)

// Error constants representing different types of errors.
Expand Down Expand Up @@ -121,7 +122,7 @@ func ShouldCrash(err error) bool {
if err == nil {
return false
}
errStr := grpc.ErrorDesc(err)
errStr := status.Convert(err).Message()
return strings.Contains(errStr, "REUSE_RAFTID") ||
strings.Contains(errStr, "REUSE_ADDR") ||
strings.Contains(errStr, "NO_ADDR") ||
Expand Down