Revert "Close connection while dropping"

This reverts commit 5ef1391b9a.
This commit is contained in:
godmodegalactus 2024-04-03 10:02:45 +02:00
parent 5ef1391b9a
commit 6b8fe682ae
No known key found for this signature in database
GPG Key ID: 22DA4A30887FDA3C
1 changed files with 1 additions and 10 deletions

View File

@ -4,7 +4,7 @@ use crate::quic_connection_utils::{
use futures::FutureExt; use futures::FutureExt;
use log::warn; use log::warn;
use prometheus::{core::GenericGauge, opts, register_int_gauge}; use prometheus::{core::GenericGauge, opts, register_int_gauge};
use quinn::{Connection, Endpoint, VarInt}; use quinn::{Connection, Endpoint};
use solana_lite_rpc_core::structures::rotating_queue::RotatingQueue; use solana_lite_rpc_core::structures::rotating_queue::RotatingQueue;
use solana_sdk::pubkey::Pubkey; use solana_sdk::pubkey::Pubkey;
use std::{ use std::{
@ -44,15 +44,6 @@ pub struct QuicConnection {
has_connected_once: Arc<AtomicBool>, has_connected_once: Arc<AtomicBool>,
} }
impl Drop for QuicConnection {
fn drop(&mut self) {
let lk = self.connection.blocking_read();
if let Some(connection) = lk.as_ref() {
connection.close(VarInt::from_u32(0), b"Not needed")
}
}
}
impl QuicConnection { impl QuicConnection {
pub fn new( pub fn new(
identity: Pubkey, identity: Pubkey,