Skip to content

Commit

Permalink
feat: added trace logs on drop
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghamza-Jd committed Dec 28, 2023
1 parent 43abd2c commit 568b56d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions jarust/src/jahandle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ impl JaHandle {

impl Drop for InnerHandle {
fn drop(&mut self) {
log::trace!("Dropping handle {{ id: {} }}", self.shared.id);
self.shared.join_handle.abort();
}
}
2 changes: 1 addition & 1 deletion jarust/src/jasession.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ impl JaSession {
impl Drop for SafeShared {
fn drop(&mut self) {
if let Some(join_handle) = self.join_handle.take() {
join_handle.abort();
log::trace!("Keepalive task aborted");
join_handle.abort();
}
}
}
1 change: 1 addition & 0 deletions jarust/src/transport/wss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ impl Transport for WebsocketTransport {
impl Drop for WebsocketTransport {
fn drop(&mut self) {
if let Some(join_handle) = self.forward_join_handle.take() {
log::trace!("Dropping wss transport");
join_handle.abort();
}
}
Expand Down

0 comments on commit 568b56d

Please sign in to comment.