Skip to content

Commit

Permalink
refactor: remove legacy::client workaround for fixed race condition i…
Browse files Browse the repository at this point in the history
…n mpsc channel (#159)

Co-authored-by: JESS IZEN <[email protected]>
  • Loading branch information
jlizen and JESS IZEN authored Dec 6, 2024
1 parent 7a39c88 commit dce81a0
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/client/legacy/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,17 +344,6 @@ where
extra.set(res.extensions_mut());
}

// As of [email protected], 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
Expand Down

0 comments on commit dce81a0

Please sign in to comment.