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.