fix compiling with metrics

This commit is contained in:
Marcel Märtens 2020-08-27 09:32:04 +02:00
parent 2dfde32b45
commit a7b7ae3a2c
2 changed files with 4 additions and 5 deletions

View File

@ -319,11 +319,7 @@ impl Handshake {
.unwrap();
}
async fn send_init(
&self,
c2w_frame_s: &mut mpsc::UnboundedSender<Frame>,
#[cfg(not(feature = "metrics"))] _pid_string: &str,
) {
async fn send_init(&self, c2w_frame_s: &mut mpsc::UnboundedSender<Frame>) {
#[cfg(feature = "metrics")]
self.metrics
.frames_out_total

View File

@ -490,7 +490,10 @@ impl BParticipant {
async move {
let (channel, b2w_frame_s, b2r_read_shutdown) = Channel::new(cid);
let mut lock = channels.write().await;
#[cfg(feature = "metrics")]
let mut channel_no = lock.len();
#[cfg(not(feature = "metrics"))]
let channel_no = lock.len();
lock.insert(
cid,
Mutex::new(ChannelInfo {