Fossil

Check-in [970cc4f1]
Login

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

Overview
Comment:Only check time, if it is set.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | experimental
Files: files | file ages | folders
SHA1:970cc4f16f3483c066534e14ed63ce68d374add3
User & Date: joerg 2013-01-23 12:31:09
Context
2013-01-23
13:24
Add the max-download-time server option that limits the amount of real-time that the server will spend preparing an xfer protocol reply. check-in: 769c90a2 user: drh tags: trunk
12:31
Only check time, if it is set. Closed-Leaf check-in: 970cc4f1 user: joerg tags: experimental
2013-01-18
22:05
Add new option max-download-time to limit the processing time of pull/sync /clone requests. This helps to significantly cut down the number of time outs clients receive on busy server with reverse proxy configuration. It generally provides better response times. check-in: ee6ae580 user: joerg tags: experimental
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/xfer.c.

394
395
396
397
398
399
400

401
402
403
404
405
406
407
408
  }else{
    pUuid = &uuid;
  }
  if( uuid_is_shunned(blob_str(pUuid)) ){
    blob_reset(&uuid);
    return;
  }

  if( time(NULL) >= pXfer->maxTime || pXfer->mxSend<=blob_size(pXfer->pOut) ){
    const char *zFormat = isPriv ? "igot %b 1\n" : "igot %b\n";
    blob_appendf(pXfer->pOut, zFormat, pUuid);
    pXfer->nIGotSent++;
    blob_reset(&uuid);
    return;
  }
  if( nativeDelta ){







>
|







394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
  }else{
    pUuid = &uuid;
  }
  if( uuid_is_shunned(blob_str(pUuid)) ){
    blob_reset(&uuid);
    return;
  }
  if( (pXfer->maxTime != -1 && time(NULL) >= pXfer->maxTime) || 
       pXfer->mxSend<=blob_size(pXfer->pOut) ){
    const char *zFormat = isPriv ? "igot %b 1\n" : "igot %b\n";
    blob_appendf(pXfer->pOut, zFormat, pUuid);
    pXfer->nIGotSent++;
    blob_reset(&uuid);
    return;
  }
  if( nativeDelta ){