Fossil SCM
Only sleep if there are more sync attempts to be made.
Commit
e1dccc177250a2e55e1d89b7f60b93004f7b2b70
Parent
76bc297e96211b5…
1 file changed
+2
-2
+2
-2
| --- src/sync.c | ||
| +++ src/sync.c | ||
| @@ -82,14 +82,14 @@ | ||
| 82 | 82 | ** .5 second sleep between attempts; returning the last autosync status. |
| 83 | 83 | */ |
| 84 | 84 | int autosync_loop(int flags, int nTries){ |
| 85 | 85 | int n = 0; |
| 86 | 86 | int rc = 0; |
| 87 | - while( (n==0 || n < nTries) && (rc = autosync(flags) )){ | |
| 87 | + while( (n==0 || n < nTries) && (rc = autosync(flags)) ){ | |
| 88 | 88 | if( rc ) fossil_warning("Autosync failed%s", |
| 89 | 89 | ++n < nTries ? ", making another attempt." : "."); |
| 90 | - sqlite3_sleep(500); | |
| 90 | + if( n < nTries ) sqlite3_sleep(500); | |
| 91 | 91 | } |
| 92 | 92 | return rc; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /* |
| 96 | 96 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -82,14 +82,14 @@ | |
| 82 | ** .5 second sleep between attempts; returning the last autosync status. |
| 83 | */ |
| 84 | int autosync_loop(int flags, int nTries){ |
| 85 | int n = 0; |
| 86 | int rc = 0; |
| 87 | while( (n==0 || n < nTries) && (rc = autosync(flags) )){ |
| 88 | if( rc ) fossil_warning("Autosync failed%s", |
| 89 | ++n < nTries ? ", making another attempt." : "."); |
| 90 | sqlite3_sleep(500); |
| 91 | } |
| 92 | return rc; |
| 93 | } |
| 94 | |
| 95 | /* |
| 96 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -82,14 +82,14 @@ | |
| 82 | ** .5 second sleep between attempts; returning the last autosync status. |
| 83 | */ |
| 84 | int autosync_loop(int flags, int nTries){ |
| 85 | int n = 0; |
| 86 | int rc = 0; |
| 87 | while( (n==0 || n < nTries) && (rc = autosync(flags)) ){ |
| 88 | if( rc ) fossil_warning("Autosync failed%s", |
| 89 | ++n < nTries ? ", making another attempt." : "."); |
| 90 | if( n < nTries ) sqlite3_sleep(500); |
| 91 | } |
| 92 | return rc; |
| 93 | } |
| 94 | |
| 95 | /* |
| 96 |