Skip to content

Commit 998f4f2

Browse files
committed
Remove hyper::Error::is_connect
`is_connect` was deprecated when the higher-level client was removed from hyper. The corresponding comments are removed as well.
1 parent 2c60deb commit 998f4f2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tonic/src/status.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -412,13 +412,7 @@ impl Status {
412412
// > status. Note that the frequency of PINGs is highly dependent on the network
413413
// > environment, implementations are free to adjust PING frequency based on network and
414414
// > application requirements, which is why it's mapped to unavailable here.
415-
//
416-
// Likewise, if we are unable to connect to the server, map this to UNAVAILABLE. This is
417-
// consistent with the behavior of a C++ gRPC client when the server is not running, and
418-
// matches the spec of:
419-
// > The service is currently unavailable. This is most likely a transient condition that
420-
// > can be corrected if retried with a backoff.
421-
if err.is_timeout() || err.is_connect() {
415+
if err.is_timeout() {
422416
return Some(Status::unavailable(err.to_string()));
423417
}
424418

@@ -1009,3 +1003,4 @@ mod tests {
10091003
assert_eq!(status.details(), DETAILS);
10101004
}
10111005
}
1006+

0 commit comments

Comments
 (0)