Changeset 3970 in subversion


Ignore:
Timestamp:
Sep 16, 2010 9:02:27 AM (3 years ago)
Author:
alec
Message:
  • Use random sleep interval up to 3 sec. in 'get' action when IMAP conn. fails
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/mail/get.inc

    r3969 r3970  
    4242  // To workaround this we'll wait for some time 
    4343  // and try again (once). 
    44   // Note: When message contains more inline parts and the server limit is low 
    45   // this stil maybe the issue, while we're using the same sleep interval, but 
    46   // I didn't found better solution. 
     44  // Note: Random sleep interval is used to minimize concurency 
     45  // in getting message parts 
    4746  if (!isset($_GET['_redirected'])) { 
    48     sleep(2); 
     47    usleep(rand(10,30)*100000); // 1-3 sec. 
    4948    header('Location: ' . $_SERVER['REQUEST_URI'] . '&_redirected=1'); 
    5049  } 
Note: See TracChangeset for help on using the changeset viewer.