File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ static size_t cacert_len = sizeof(cacert_pem) - 1;
2727#define CLOUDSYNC_SESSION_TOKEN_MAXSIZE 4096
2828
2929#define DEFAULT_SYNC_WAIT_MS 100
30- #define DEFAULT_SYNC_MAX_RETRIES 10
30+ #define DEFAULT_SYNC_MAX_RETRIES 1
3131
3232#define MAX_QUERY_VALUE_LEN 256
3333
@@ -725,13 +725,13 @@ int cloudsync_network_check_internal(sqlite3_context *context) {
725725void cloudsync_network_sync (sqlite3_context * context , int wait_ms , int max_retries ) {
726726 cloudsync_network_send_changes (context , 0 , NULL );
727727
728- int retries = 0 ;
728+ int ntries = 0 ;
729729 int nrows = 0 ;
730- while (retries < max_retries ) {
730+ while (ntries < max_retries ) {
731+ if (ntries > 0 ) sqlite3_sleep (wait_ms );
731732 nrows = cloudsync_network_check_internal (context );
732733 if (nrows > 0 ) break ;
733- else sqlite3_sleep (wait_ms );
734- retries ++ ;
734+ ntries ++ ;
735735 }
736736
737737 sqlite3_result_error_code (context , (nrows == -1 ) ? SQLITE_ERROR : SQLITE_OK );
You can’t perform that action at this time.
0 commit comments