[coro_http.websocket]Fix websocket example (#651)
This commit is contained in:
parent
38e2b7bd01
commit
09aefcb51e
|
@ -183,9 +183,8 @@ async_simple::coro::Lazy<void> 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.
|
||||
|
|
Loading…
Reference in New Issue