Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMacocian committed Aug 10, 2024
2 parents 41b2785 + f23c156 commit c9ecc27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion GuildWarsPartySearch.Bot/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,11 @@ static void connect_websocket() {

LogInfo("Attempting to connect. Try %d/%d", i + 1, connect_retries);
ws = easywsclient::WebSocket::from_url(bot_configuration.web_socket_url, user_agent);
if (!ws)
if (!ws) {
// Sleep before retry
time_sleep_sec(5);
continue;
}
// Wait for websocket to open
for (auto j = 0; j < 5000; j+=50) {
ws->poll();
Expand Down

0 comments on commit c9ecc27

Please sign in to comment.