From 0aadc944421c5504e13b6d9304f1c646bee0b879 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 23 Sep 2021 17:50:13 +0200 Subject: [PATCH] Properly initialize `response_channels` Co-Authored-By: Nathan Sobo --- zrpc/src/peer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zrpc/src/peer.rs b/zrpc/src/peer.rs index 9b1728b195..251ffb5bb5 100644 --- a/zrpc/src/peer.rs +++ b/zrpc/src/peer.rs @@ -115,7 +115,7 @@ impl Peer { let connection_state = ConnectionState { outgoing_tx, next_message_id: Default::default(), - response_channels: Default::default(), + response_channels: Arc::new(Mutex::new(Some(Default::default()))), }; let mut writer = MessageStream::new(connection.tx); let mut reader = MessageStream::new(connection.rx);