Differences From:
File
src/xfer.c
part of check-in
[0c102d06c3]
- Fixes to the sync algorithm.
by
drh on
2007-08-01 10:27:08.
[view]
To:
File
src/xfer.c
part of check-in
[35d7ba08ac]
- Always do at least two cycles with no file transfers before quiting.
by
drh on
2007-08-01 10:29:17.
[view]
@@ -514,8 +514,9 @@
int nFile = 0;
int nMsg = 0;
int nReq = 0;
int nFileSend;
+ int nNoFileCycle = 0;
Blob send; /* Text we are sending to the server */
Blob recv; /* Reply we got back from the server */
Blob line; /* A single line of the reply */
Blob aToken[5]; /* A tokenization of line */
@@ -705,9 +706,16 @@
}
blob_reset(&recv);
printf("Received: %d files, %d requests, %d other messages\n",
nFile, nReq, nMsg);
- if( nFileSend + nFile==0 ){ go = 0; }
+ if( nFileSend + nFile==0 ){
+ nNoFileCycle++;
+ if( nNoFileCycle>1 ){
+ go = 0;
+ }
+ }else{
+ nNoFileCycle = 0;
+ }
nFile = nReq = nMsg = 0;
};
http_close();
db_end_transaction(0);