PluginDevHelper
PluginDevHelper copied to clipboard
curRetry is always 0
static DWORD WINAPI WebSocketThread(LPVOID)
{
using namespace std::chrono_literals;
// this can happen when code becomes stale and we need to re-establish connection again
int curRetry = 0;
while (curRetry < MAX_RETRIES) {
std::this_thread::sleep_for(500ms);
// connection successful or stop signal received after retry
if (ConnectToSocket() || bStopWebSocketThread) {
return 0;
}
}
return 0;
}
should add curRetry++