Skip to content

Commit

Permalink
chore: format code
Browse files Browse the repository at this point in the history
Signed-off-by: Li Zhanhui <lizhanhui@gmail.com>
  • Loading branch information
lizhanhui committed Jan 5, 2025
1 parent 232725a commit 61c9031
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions rust/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl Client {

for session in sessions.unwrap() {
let peer = session.peer().to_string();
let response = Self::heart_beat_inner(session, &group, &namespace, &client_type).await;
let response = Self::heartbeat_inner(session, &group, &namespace, &client_type).await;
if response.is_err() {
error!(
logger,
Expand Down Expand Up @@ -322,7 +322,7 @@ impl Client {
.await
}

async fn heart_beat_inner<T: RPCClient + 'static>(
async fn heartbeat_inner<T: RPCClient + 'static>(
mut rpc_client: T,
group: &Option<String>,
namespace: &str,
Expand Down Expand Up @@ -1123,7 +1123,7 @@ pub(crate) mod tests {
.return_once(|_| Box::pin(futures::future::ready(response)));

let send_result =
Client::heart_beat_inner(mock, &Some("group".to_string()), "", &ClientType::Producer)
Client::heartbeat_inner(mock, &Some("group".to_string()), "", &ClientType::Producer)
.await;
assert!(send_result.is_ok());
}
Expand Down
5 changes: 4 additions & 1 deletion rust/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,10 @@ impl RPCClient for Session {
Ok(response.into_inner())
}
Err(elapsed) => {
warn!(self.logger, "Heartbeat RPC timed out, reset telemetry bidirectional stream");
warn!(
self.logger,
"Heartbeat RPC timed out, reset telemetry bidirectional stream"
);
self.reset_telemetry_stream().await?;
Err(ClientError::new(
ErrorKind::RpcTimeout,
Expand Down

0 comments on commit 61c9031

Please sign in to comment.