A saner way to how only retry messages

This commit is contained in:
Andre Leiradella 2017-10-14 14:06:26 +01:00
parent aadc532b9c
commit f462d5e7c2

View File

@ -3455,6 +3455,9 @@ static int cheevos_iterate(coro_t* coro)
for (K = 0; K < 5; K++)
{
if (K != 0)
RARCH_LOG("[CHEEVOS]: Retrying HTTP request: %u of 5\n", K + 1);
JSON = NULL;
CONN = net_http_connection_new(URL, "GET", NULL);
@ -3510,9 +3513,6 @@ static int cheevos_iterate(coro_t* coro)
net_http_delete(HTTP);
net_http_connection_free(CONN);
if (K < 4)
RARCH_LOG("[CHEEVOS]: Retrying HTTP request: %u of 5\n", K + 2);
}
RARCH_LOG("[CHEEVOS]: Couldn't connect to server after 5 tries\n");