zaphoyd / websocketpp

C++ websocket client/server library
http://www.zaphoyd.com/websocketpp
Other
7.08k stars 1.98k forks source link

handle_read_frame error #1048

Open cpp77 opened 2 years ago

cpp77 commented 2 years ago

I left a connection listening to streamed data but returned to find this:

[2022-07-05 12:12:36] [info] asio async_read_at_least error: asio.ssl.stream:1 (stream truncated) [2022-07-05 12:12:36] [error] handle_read_frame error: websocketpp.transport:2 (Underlying Transport Error)

I'm using the FTX (crypto exchange) Github project code:

https://github.com/ftexchange/ftx

SapitoSucio commented 2 years ago

Did you find a fix for it ?

MrTrigger commented 2 years ago

Have the same issue

MrTrigger commented 2 years ago

FYI I fixed this by spawning a thread to run the websocket client in since that's blocking and you can't handle the messages coming in. So in the FTX client you need to spawn WS::connect() in a separate thread.

sierret commented 1 year ago

I'm just reading this in early 2023 and watching the timeline of this thread.

@MrTrigger was running this with FTX and the last fix was posted in 8th Oct 2022. Which was literally the day FTX collapse started, first with halted withdrawals, with them declaring bankruptcy a few days later. That's crazy.

And well, that's a small explainer for future readers who are confused.