1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-05-19 16:58:14 +00:00

Check WS stream completed after close.

This commit is contained in:
Yury Yarashevich 2023-07-31 12:12:45 +02:00
parent ff8fd2f7b5
commit d3911ec285

View file

@ -65,4 +65,8 @@ async fn test_simple() {
let item = framed.next().await.unwrap().unwrap();
assert_eq!(item, ws::Frame::Close(Some(ws::CloseCode::Normal.into())));
let nothing = actix_rt::time::timeout(std::time::Duration::from_secs(1), framed.next()).await;
assert_eq!(true, nothing.is_ok());
assert_eq!(true, nothing.unwrap().is_none());
}