cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

Websocket Connect/Disconnect crash or block forever

Open q18roychoi opened this issue 7 years ago • 4 comments

i am working on the websocket disconnect checking, and i found that when i turn off the network, those msg suppose will not send(since the network are disconnected) will block for a while and resend after connect again(also the period it block after reconnect depend on how long you disconnect), that is not i want

so i try to disconnect manually(websocket_callback_client.close().wait()) when i detected disconnect to avoid msg resend again, but it is not working too, the disconnect function will blocking forever, also i try to connect again manually(client.connect(U(websocket_url)).wait();), it will crash(Assertion `m_state == CREATED' failed)

what should i do to check the connection? and avoid the msg resend again?

q18roychoi avatar Sep 08 '18 13:09 q18roychoi

any one can help?

q18roychoi avatar Sep 23 '18 00:09 q18roychoi

I have the same problem at the moment and was wondering if somebody has the answer!

When I try to reconnect after the websocket lost connection, it will give the same error as q18roychoi stated.

tmeulenb avatar Jun 30 '20 09:06 tmeulenb

same problem

gaborszita avatar Sep 13 '20 06:09 gaborszita

me too, same problem。anyone can double checking this issues?

leezhm avatar Sep 21 '23 06:09 leezhm