Skip to content

Commit

Permalink
Close test's websocket on shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
nullstalgia committed Sep 24, 2024
1 parent d0ba664 commit 52c7d83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/websocket_to_txt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ async fn websocket_to_txt() -> Result<(), iron_heart::errors::AppError> {
assert_eq!(file_contents.trim().parse::<u16>()?, hr);
}

std::fs::remove_file(file_dir)?;

println!("Shutting down, all ok");

parent_token.cancel();
std::fs::remove_file(file_dir)?;
client.close().await?;
let _ = app_thread.join();
Ok(())
}

0 comments on commit 52c7d83

Please sign in to comment.