File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1680,15 +1680,20 @@ static void psync_fsupload_check_tasks(){
1680
1680
}
1681
1681
1682
1682
static void psync_fsupload_thread (){
1683
+ int waited ;
1683
1684
clean_stuck_tasks ();
1685
+ waited = 0 ;
1684
1686
while (psync_do_run ){
1685
1687
psync_wait_statuses_array (requiredstatusesnooverquota , ARRAY_SIZE (requiredstatusesnooverquota ));
1686
1688
// it is better to sleep a bit to give a chance for events to accumulate
1687
- psync_milisleep (10 );
1689
+ if (waited )
1690
+ psync_milisleep (100 );
1688
1691
psync_fsupload_check_tasks ();
1689
1692
pthread_mutex_lock (& upload_mutex );
1690
- while (!upload_wakes )
1693
+ while (!upload_wakes ){
1691
1694
pthread_cond_wait (& upload_cond , & upload_mutex );
1695
+ waited = 1 ;
1696
+ }
1692
1697
upload_wakes = 0 ;
1693
1698
pthread_mutex_unlock (& upload_mutex );
1694
1699
}
You can’t perform that action at this time.
0 commit comments