2
0
mirror of https://github.com/boostorg/beast.git synced 2026-01-23 05:22:09 +00:00
Files
beast/example/websocket/server/async/websocket_server_async.cpp
oerol 90e37ae40b return statement to exit reading loop
Merges PR#2414

I used this example to start building my WebSocket application, however, I noticed that upon removing the echoing in the on_read method, the server repeatedly throws errors without exiting the method.

You can recreate this problem by replacing the async_write with do_write and cause any error (i.e. client reloads the page).

Adding a return statement here would make debugging for future changes much easier and it wouldn't harm the existing echoing in any way.
2022-04-26 23:41:25 +02:00

7.1 KiB