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

fix(console): fix the issue of continuous reconnection caused by decode failure #500

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 2 additions & 0 deletions tokio-console/src/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ macro_rules! with_client {

impl Connection {
const BACKOFF: Duration = Duration::from_millis(500);
const MAX_DECODING_MESSAGE_SIZE: usize = 16 * 1024 * 1024;
pub fn new(target: Uri) -> Self {
Self {
target,
Expand Down Expand Up @@ -108,6 +109,7 @@ impl Connection {
}
};
let mut client = InstrumentClient::new(channel);
client = client.max_decoding_message_size(Self::MAX_DECODING_MESSAGE_SIZE);
let request = tonic::Request::new(InstrumentRequest {});
let stream = Box::new(client.watch_updates(request).await?.into_inner());
Ok::<State, Box<dyn Error + Send + Sync>>(State::Connected { client, stream })
Expand Down