PluginDevHelper icon indicating copy to clipboard operation
PluginDevHelper copied to clipboard

curRetry is always 0

Open weituotian opened this issue 1 year ago • 0 comments

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++

weituotian avatar Feb 02 '23 06:02 weituotian