function SmtpTransport::checkRestartThreshold
1 call to SmtpTransport::checkRestartThreshold()
- SmtpTransport::send in vendor/
symfony/ mailer/ Transport/ Smtp/ SmtpTransport.php
File
-
vendor/
symfony/ mailer/ Transport/ Smtp/ SmtpTransport.php, line 357
Class
- SmtpTransport
- Sends emails over SMTP.
Namespace
Symfony\Component\Mailer\Transport\SmtpCode
private function checkRestartThreshold() : void {
// when using sendmail via non-interactive mode, the transport is never "started"
if (!$this->started) {
return;
}
++$this->restartCounter;
if ($this->restartCounter < $this->restartThreshold) {
return;
}
$this->stop();
if (0 < ($sleep = $this->restartThresholdSleep)) {
$this->getLogger()
->debug(\sprintf('Email transport "%s" sleeps for %d seconds after stopping', __CLASS__, $sleep));
sleep($sleep);
}
$this->start();
$this->restartCounter = 0;
}