diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-09 13:40:23 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-09 13:40:23 +0000 |
| commit | 77aa861396f15e02c2dee4d23991bba1547e3664 (patch) | |
| tree | 7fc2029fe2a9a4b5b7e7d190424b9f64dc931610 /roundcubemail/program/steps/mail/compose.inc | |
| parent | 4d4180e13b0620f3713ca1d672b3cc256b4097fa (diff) | |
Consider replication delays in session storage
git-svn-id: https://svn.roundcube.net/trunk@5403 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/compose.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/compose.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc index 6961bf86a..c527ce15f 100644 --- a/roundcubemail/program/steps/mail/compose.inc +++ b/roundcubemail/program/steps/mail/compose.inc @@ -31,6 +31,14 @@ $MESSAGE = NULL; $COMPOSE_ID = get_input_value('_id', RCUBE_INPUT_GET); $_SESSION['compose'] = $_SESSION['compose_data_'.$COMPOSE_ID]; +// give replicated session storage some time to synchronize +$retries = 0; +while ($COMPOSE_ID && !is_array($_SESSION['compose']) && $RCMAIL->db->is_replicated() && $retries++ < 5) { + usleep(500000); + $RCMAIL->session->reload(); + $_SESSION['compose'] = $_SESSION['compose_data_'.$COMPOSE_ID]; +} + // Nothing below is called during message composition, only at "new/forward/reply/draft" initialization or // if a compose-ID is given (i.e. when the compose step is opened in a new window/tab). if (!is_array($_SESSION['compose'])) |
