From 60ef74a18fed4b4dc71650596a5e94d7093f0d85 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 8 Jul 2021 22:09:02 -0700 Subject: [PATCH] Use select_biased! in Peer to avoid non-determinism --- zed-rpc/src/peer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zed-rpc/src/peer.rs b/zed-rpc/src/peer.rs index 29c09ecf38..8e9a58a14c 100644 --- a/zed-rpc/src/peer.rs +++ b/zed-rpc/src/peer.rs @@ -312,7 +312,7 @@ where let read_message = self.reader.read_message().fuse(); futures::pin_mut!(read_message); loop { - futures::select! { + futures::select_biased! { incoming = read_message => match incoming { Ok(incoming) => { Self::handle_incoming_message(incoming, &self.peer, self.connection_id, &self.response_channels).await;