From 9874f7f8d7b4e5267c36b13fde80d200719253ef Mon Sep 17 00:00:00 2001 From: JESS IZEN Date: Thu, 5 Dec 2024 18:57:39 +0000 Subject: [PATCH] chore: remove legacy::client workaround for fixed race condition in mpsc channel --- src/client/legacy/client.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/client/legacy/client.rs b/src/client/legacy/client.rs index d37ab46..d3d5605 100644 --- a/src/client/legacy/client.rs +++ b/src/client/legacy/client.rs @@ -344,17 +344,6 @@ where extra.set(res.extensions_mut()); } - // As of futures@0.1.21, there is a race condition in the mpsc - // channel, such that sending when the receiver is closing can - // result in the message being stuck inside the queue. It won't - // ever notify until the Sender side is dropped. - // - // To counteract this, we must check if our senders 'want' channel - // has been closed after having tried to send. If so, error out... - if pooled.is_closed() { - return Ok(res); - } - // If pooled is HTTP/2, we can toss this reference immediately. // // when pooled is dropped, it will try to insert back into the