quinn: fix ref count logic for ConnectionRef and EndpointRef

This commit is contained in:
Damien Deville
2026-04-16 14:32:29 +02:00
committed by Benjamin Saunders
parent 4b796fa881
commit 37625fe2d8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -932,7 +932,7 @@ impl Clone for ConnectionRef {
impl Drop for ConnectionRef {
fn drop(&mut self) {
if self.shared.ref_count.fetch_sub(1, Ordering::Relaxed) > 0 {
if self.shared.ref_count.fetch_sub(1, Ordering::Relaxed) > 1 {
return;
}
+1 -1
View File
@@ -784,7 +784,7 @@ impl Clone for EndpointRef {
impl Drop for EndpointRef {
fn drop(&mut self) {
if self.shared.ref_count.fetch_sub(1, Ordering::Relaxed) > 0 {
if self.shared.ref_count.fetch_sub(1, Ordering::Relaxed) > 1 {
return;
}