From 0d0776ddb5e7709b8eb76c3e9f60853bff96c921 Mon Sep 17 00:00:00 2001 From: qicosmos Date: Fri, 29 Mar 2024 15:29:21 +0800 Subject: [PATCH] fix example --- example/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/example/main.cpp b/example/main.cpp index addbc59b..5026db35 100644 --- a/example/main.cpp +++ b/example/main.cpp @@ -173,9 +173,8 @@ async_simple::coro::Lazy use_websocket() { result.type == ws_frame_type::WS_BINARY_FRAME) { std::cout << result.data << "\n"; } - - if (result.type == ws_frame_type::WS_PING_FRAME || - result.type == ws_frame_type::WS_PONG_FRAME) { + else if (result.type == ws_frame_type::WS_PING_FRAME || + result.type == ws_frame_type::WS_PONG_FRAME) { // ping pong frame just need to continue, no need echo anything, // because framework has reply ping/pong msg to client // automatically.