Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions volo-grpc/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,24 +229,6 @@ where
self
}

/// Sets that all sockets have `SO_KEEPALIVE` set with the supplied duration.
///
/// If `None`, the option will not be set.
///
/// Default is `None`.
pub fn tcp_keepalive(mut self, dur: impl Into<Option<Duration>>) -> Self {
self.http2_config.tcp_keepalive = dur.into();
self
}

/// Sets that all sockets have `SO_NODELAY` set to the supplied value `nodelay`.
///
/// Default is `true`.
pub fn tcp_nodelay(mut self, nodelay: bool) -> Self {
self.http2_config.tcp_nodelay = nodelay;
self
}

/// Sets the timeout for connecting to a URL.
///
/// Default is no timeout.
Expand Down Expand Up @@ -548,8 +530,6 @@ pub struct Http2Config {
pub(crate) max_concurrent_reset_streams: usize,
pub(crate) retry_canceled_requests: bool,
pub(crate) accept_http1: bool,
pub(crate) tcp_keepalive: Option<Duration>,
pub(crate) tcp_nodelay: bool,
}

impl Default for Http2Config {
Expand All @@ -565,8 +545,6 @@ impl Default for Http2Config {
max_concurrent_reset_streams: DEFAULT_MAX_CONCURRENT_RESET_STREAMS,
retry_canceled_requests: true,
accept_http1: false,
tcp_keepalive: None,
tcp_nodelay: true,
}
}
}
1 change: 1 addition & 0 deletions volo-grpc/src/layer/loadbalance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ where
}
Err(err) => {
tracing::warn!("[VOLO] call endpoint: {:?} error: {:?}", addr, err);
return Err(err);
}
}
} else {
Expand Down
8 changes: 4 additions & 4 deletions volo-grpc/src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -763,10 +763,10 @@ impl From<LoadBalanceError> for Status {

impl Retryable for Status {
fn retryable(&self) -> bool {
match self.code {
Code::Internal | Code::Unavailable | Code::Cancelled | Code::ResourceExhausted => true,
_ => false,
}
matches!(
self.code,
Code::Internal | Code::Unavailable | Code::Cancelled | Code::ResourceExhausted
)
}
}

Expand Down