Skip to content

Commit

Permalink
Improve connection sleep time selection when fetching emails to avoid…
Browse files Browse the repository at this point in the history
… connection setup failed error - closes #4227
  • Loading branch information
freescout-help-desk committed Sep 13, 2024
1 parent fbae84b commit a19bfd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Console/Commands/FetchEmails.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function ($mailboxId) {
// (when there are many mailboxes for example),
// we increase connection sleep time and retry after sleep.
// https://github.com/freescout-help-desk/freescout/issues/4227
if (strstr($e->getMessage(), 'connection setup failed')) {
if (trim($e->getMessage()) == 'connection setup failed') {
$sleep += 200000;

usleep(self::MAX_SLEEP);
Expand Down

0 comments on commit a19bfd4

Please sign in to comment.