Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Oct 15, 2023
1 parent e78ba74 commit b2b0ff3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ pub struct Endpoint {
pub address: EndpointAddress,
#[serde(default)]
pub metadata: EndpointMetadata,
#[serde(skip, default)]
pub sessions: std::sync::Arc<std::sync::atomic::AtomicUsize>,
}

impl Endpoint {
Expand All @@ -62,7 +60,6 @@ impl Default for Endpoint {
Self {
address: EndpointAddress::UNSPECIFIED,
metadata: <_>::default(),
sessions: <_>::default(),
}
}
}
Expand Down Expand Up @@ -99,7 +96,6 @@ impl TryFrom<crate::cluster::proto::Endpoint> for Endpoint {

Ok(Self {
address: (host, endpoint.port as u16).into(),
sessions: <_>::default(),
metadata: endpoint
.metadata
.map(TryFrom::try_from)
Expand Down
3 changes: 0 additions & 3 deletions src/proxy/sessions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,6 @@ impl Drop for Session {
fn drop(&mut self) {
self.active_session_metric().dec();
metrics::duration_secs().observe(self.created_at.elapsed().as_secs() as f64);
self.dest
.sessions
.fetch_sub(1, std::sync::atomic::Ordering::SeqCst);

if let Err(error) = self.shutdown_tx.send(()) {
tracing::warn!(%error, "Error sending session shutdown signal");
Expand Down

0 comments on commit b2b0ff3

Please sign in to comment.