Merge pull request #3193 from christianseel/patch-1
Enhance 'interrupted system call' check to handle non-english locale
This commit is contained in:
commit
800919c6a4
11
src/SMTP.php
11
src/SMTP.php
|
|
@ -1340,7 +1340,16 @@ class SMTP
|
||||||
|
|
||||||
//stream_select returns false when the `select` system call is interrupted
|
//stream_select returns false when the `select` system call is interrupted
|
||||||
//by an incoming signal, try the select again
|
//by an incoming signal, try the select again
|
||||||
if (stripos($message, 'interrupted system call') !== false) {
|
if (
|
||||||
|
stripos($message, 'interrupted system call') !== false ||
|
||||||
|
(
|
||||||
|
// on applications with a different locale than english, the message above is not found because
|
||||||
|
// it's translated. So we also check for the SOCKET_EINTR constant which is defined under
|
||||||
|
// Windows and UNIX-like platforms (if available on the platform).
|
||||||
|
defined('SOCKET_EINTR') &&
|
||||||
|
stripos($message, 'stream_select(): Unable to select [' . SOCKET_EINTR . ']') !== false
|
||||||
|
)
|
||||||
|
) {
|
||||||
$this->edebug(
|
$this->edebug(
|
||||||
'SMTP -> get_lines(): retrying stream_select',
|
'SMTP -> get_lines(): retrying stream_select',
|
||||||
self::DEBUG_LOWLEVEL
|
self::DEBUG_LOWLEVEL
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue