Fossil SCM
Use sqlite3_sleep() instead with a shorter wait.
Commit
714f3ec3797d94c0ab97087a1b1acffe04df9c52
Parent
fae1eca8f67e9a8…
1 file changed
+1
-8
+1
-8
| --- src/sync.c | ||
| +++ src/sync.c | ||
| @@ -19,17 +19,10 @@ | ||
| 19 | 19 | */ |
| 20 | 20 | #include "config.h" |
| 21 | 21 | #include "sync.h" |
| 22 | 22 | #include <assert.h> |
| 23 | 23 | |
| 24 | -#if defined(_WIN32) | |
| 25 | -# include <windows.h> /* for Sleep */ | |
| 26 | -# if defined(__MINGW32__) || defined(_MSC_VER) | |
| 27 | -# define sleep Sleep /* windows does not have sleep, but Sleep */ | |
| 28 | -# endif | |
| 29 | -#endif | |
| 30 | - | |
| 31 | 24 | #define AUTOSYNC_TRIES 3 |
| 32 | 25 | |
| 33 | 26 | /* |
| 34 | 27 | ** If the repository is configured for autosyncing, then do an |
| 35 | 28 | ** autosync. This will be a pull if the argument is true or a push |
| @@ -94,11 +87,11 @@ | ||
| 94 | 87 | int n = 0; |
| 95 | 88 | int rc = 0; |
| 96 | 89 | while (n++ < AUTOSYNC_TRIES && (rc = autosync(flags))){ |
| 97 | 90 | if( rc ) fossil_warning("Autosync failed%s", |
| 98 | 91 | n < AUTOSYNC_TRIES ? ", making another attempt." : "."); |
| 99 | - sleep(1); | |
| 92 | + sqlite3_sleep(500); | |
| 100 | 93 | } |
| 101 | 94 | return rc; |
| 102 | 95 | } |
| 103 | 96 | |
| 104 | 97 | /* |
| 105 | 98 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -19,17 +19,10 @@ | |
| 19 | */ |
| 20 | #include "config.h" |
| 21 | #include "sync.h" |
| 22 | #include <assert.h> |
| 23 | |
| 24 | #if defined(_WIN32) |
| 25 | # include <windows.h> /* for Sleep */ |
| 26 | # if defined(__MINGW32__) || defined(_MSC_VER) |
| 27 | # define sleep Sleep /* windows does not have sleep, but Sleep */ |
| 28 | # endif |
| 29 | #endif |
| 30 | |
| 31 | #define AUTOSYNC_TRIES 3 |
| 32 | |
| 33 | /* |
| 34 | ** If the repository is configured for autosyncing, then do an |
| 35 | ** autosync. This will be a pull if the argument is true or a push |
| @@ -94,11 +87,11 @@ | |
| 94 | int n = 0; |
| 95 | int rc = 0; |
| 96 | while (n++ < AUTOSYNC_TRIES && (rc = autosync(flags))){ |
| 97 | if( rc ) fossil_warning("Autosync failed%s", |
| 98 | n < AUTOSYNC_TRIES ? ", making another attempt." : "."); |
| 99 | sleep(1); |
| 100 | } |
| 101 | return rc; |
| 102 | } |
| 103 | |
| 104 | /* |
| 105 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -19,17 +19,10 @@ | |
| 19 | */ |
| 20 | #include "config.h" |
| 21 | #include "sync.h" |
| 22 | #include <assert.h> |
| 23 | |
| 24 | #define AUTOSYNC_TRIES 3 |
| 25 | |
| 26 | /* |
| 27 | ** If the repository is configured for autosyncing, then do an |
| 28 | ** autosync. This will be a pull if the argument is true or a push |
| @@ -94,11 +87,11 @@ | |
| 87 | int n = 0; |
| 88 | int rc = 0; |
| 89 | while (n++ < AUTOSYNC_TRIES && (rc = autosync(flags))){ |
| 90 | if( rc ) fossil_warning("Autosync failed%s", |
| 91 | n < AUTOSYNC_TRIES ? ", making another attempt." : "."); |
| 92 | sqlite3_sleep(500); |
| 93 | } |
| 94 | return rc; |
| 95 | } |
| 96 | |
| 97 | /* |
| 98 |