mirror of
https://github.com/actix/examples
synced 2025-06-28 09:50:36 +02:00
send the correct exit code when closing the websocket (#335)
Signed-off-by: Bart Willems <bwillems@protonmail.com>
This commit is contained in:
@ -182,7 +182,8 @@ impl StreamHandler<Result<ws::Message, ws::ProtocolError>> for WsChatSession {
|
||||
}
|
||||
}
|
||||
ws::Message::Binary(_) => println!("Unexpected binary"),
|
||||
ws::Message::Close(_) => {
|
||||
ws::Message::Close(reason) => {
|
||||
ctx.close(reason);
|
||||
ctx.stop();
|
||||
}
|
||||
ws::Message::Continuation(_) => {
|
||||
|
Reference in New Issue
Block a user