From dce81a0cbae0dd989caab74b83be953e75c5cfb1 Mon Sep 17 00:00:00 2001 From: Jess Izen <44884346+jlizen@users.noreply.github.com> Date: Fri, 6 Dec 2024 07:33:17 -0800 Subject: [PATCH] refactor: remove legacy::client workaround for fixed race condition in mpsc channel (#159) Co-authored-by: JESS IZEN --- 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