Ignore:
Timestamp:
Nov 9, 2011 8:40:23 AM (19 months ago)
Author:
thomasb
Message:

Consider replication delays in session storage

File:
1 edited

Legend:

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

    r5401 r5403  
    3131$COMPOSE_ID = get_input_value('_id', RCUBE_INPUT_GET); 
    3232$_SESSION['compose'] = $_SESSION['compose_data_'.$COMPOSE_ID]; 
     33 
     34// give replicated session storage some time to synchronize 
     35$retries = 0; 
     36while ($COMPOSE_ID && !is_array($_SESSION['compose']) && $RCMAIL->db->is_replicated() && $retries++ < 5) { 
     37  usleep(500000); 
     38  $RCMAIL->session->reload(); 
     39  $_SESSION['compose'] = $_SESSION['compose_data_'.$COMPOSE_ID]; 
     40} 
    3341 
    3442// Nothing below is called during message composition, only at "new/forward/reply/draft" initialization or 
Note: See TracChangeset for help on using the changeset viewer.