Fossil

Check-in [e1dccc17]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Only sleep if there are more sync attempts to be made.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e1dccc177250a2e55e1d89b7f60b93004f7b2b70
User & Date: andybradford 2014-06-13 06:11:00
Context
2014-06-13
08:57
Add a versioned "encoding-glob" setting for some files which contain the copyright sign (as invalid UTF-8 byte-sequence) check-in: c5a01697 user: jan.nijtmans tags: trunk
06:11
Only sleep if there are more sync attempts to be made. check-in: e1dccc17 user: andybradford tags: trunk
03:56
Add setting to control the number of autosync will be tried before returning an error. Default is historical behavior of one autosync in each direction. check-in: 76bc297e user: andybradford tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/sync.c.

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
** This routine will try a number of times to perform autosync with a
** .5 second sleep between attempts; returning the last autosync status.
*/
int autosync_loop(int flags, int nTries){
  int n = 0;
  int rc = 0;
  while( (n==0 || n < nTries) && (rc = autosync(flags) )){
    if( rc ) fossil_warning("Autosync failed%s",
      ++n < nTries ? ", making another attempt." : ".");
    sqlite3_sleep(500);
  }
  return rc;
}

/*
** This routine processes the command-line argument for push, pull,
** and sync.  If a command-line argument is given, that is the URL







|


|







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
** This routine will try a number of times to perform autosync with a
** .5 second sleep between attempts; returning the last autosync status.
*/
int autosync_loop(int flags, int nTries){
  int n = 0;
  int rc = 0;
  while( (n==0 || n < nTries) && (rc = autosync(flags)) ){
    if( rc ) fossil_warning("Autosync failed%s",
      ++n < nTries ? ", making another attempt." : ".");
    if( n < nTries ) sqlite3_sleep(500);
  }
  return rc;
}

/*
** This routine processes the command-line argument for push, pull,
** and sync.  If a command-line argument is given, that is the URL