Skip to content

Commit

Permalink
Close the web-sys transport on connection drop (#81)
Browse files Browse the repository at this point in the history
Close the web-sys connection on drop
  • Loading branch information
MOZGIII authored Feb 3, 2024
1 parent 912eff0 commit 980d1df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/xwt-web-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,9 @@ impl xwt_core::datagram::Send for Connection {
Ok(())
}
}

impl Drop for Connection {
fn drop(&mut self) {
self.transport.close();
}
}

0 comments on commit 980d1df

Please sign in to comment.