-
Notifications
You must be signed in to change notification settings - Fork 9
Open
@weituotian
Description
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++
Metadata
Metadata
Assignees
Labels
No labels