How should I handle websocket_client reconnects?

Jun 8, 2015 at 6:10 PM
Here's a simple example of what I'm trying to do:

Basically reconnect if the connect fails. This triggers a debug assertion: m_state == CREATED

I'm guessing I'm not allowed to start a new task here? If so, why, and how should I trigger a reconnect?
Jun 8, 2015 at 8:45 PM
Hi DesktopMan,

Our websocket client doesn't allow reconnecting by calling the connect function again. You can simply create a new websocket client object instance and then call connect.

Also FYI it probably is dangerous to endlessly loop if an exception occurs trying to reconnect again. You probably only will want to try a couple of times and potentially not depending on the error.