Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
Remove blocking debug in postoffice (#2002)
Browse files Browse the repository at this point in the history
When someone tries to print the postoffice daemon plugin
it will take an internal lock and block the current thread.

This is at the very least suprising and should be removed.

Signed-off-by: Joe Grund <jgrund@whamcloud.io>
  • Loading branch information
jgrund committed Jun 23, 2020
1 parent e838a00 commit 5da033d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions iml-agent/src/daemon_plugins/postoffice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use crate::{
};
use async_trait::async_trait;
use futures::{
executor::block_on,
stream::{StreamExt as _, TryStreamExt},
Future, FutureExt,
};
Expand Down Expand Up @@ -45,11 +44,7 @@ pub fn socket_name(mailbox: &str) -> String {

impl std::fmt::Debug for PostOffice {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(
f,
"PostOffice {{ {:?} }}",
block_on(self.routes.lock()).keys()
)
write!(f, "PostOffice {{ {:?} }}", self.routes)
}
}

Expand Down

0 comments on commit 5da033d

Please sign in to comment.