Overview
SHA1 Hash: | 35d7ba08aca1768ba4b61bd6d9e2dcc2e3e01c70 |
---|---|
Date: | 2007-08-01 10:29:17 |
User: | drh |
Comment: | Always do at least two cycles with no file transfers before quiting. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/xfer.c from [104eca26b1] to [47f26fcdc7].
@@ -513,10 +513,11 @@ const char *zPCode = db_get("project-code", 0); 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 */ Blob errmsg; /* Error message */ @@ -704,15 +705,22 @@ blobarray_reset(aToken, nToken); } 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); db_multi_exec( "DROP TABLE onremote;" "DROP TABLE pending;" ); }