Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Apr 15, 2024
1 parent bf8d53d commit 8ca69fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ async fn handle_or_drop_publish_after_disconnect(
.unwrap();
io.encode(codec::Packet::Disconnect, &codec).unwrap();
io.flush(true).await.unwrap();
io.force_close();
io.close();
drop(io);
sleep(Millis(250)).await;

Expand Down
6 changes: 4 additions & 2 deletions tests/test_server_v5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,8 @@ async fn handle_or_drop_publish_after_disconnect(
max_qos: QoS,
handle_qos_after_disconnect: Option<QoS>,
) -> bool {
let _ = env_logger::try_init();

let publish = Arc::new(AtomicBool::new(false));
let publish2 = publish.clone();
let disconnect = Arc::new(AtomicBool::new(false));
Expand Down Expand Up @@ -1070,9 +1072,9 @@ async fn handle_or_drop_publish_after_disconnect(
)
.unwrap();
io.flush(true).await.unwrap();
io.close();
drop(io);

sleep(Millis(50)).await;
sleep(Millis(250)).await;

assert!(disconnect.load(Relaxed));

Expand Down

0 comments on commit 8ca69fa

Please sign in to comment.