Skip to content

Commit 3970c68

Browse files
authored
[Mailer] Remove unneeded catch in ping()
The stop() method doesn't throw
1 parent a83e54c commit 3970c68

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

Smtp/SmtpTransport.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,7 @@ private function ping(): void
219219
try {
220220
$this->executeCommand("NOOP\r\n", [250]);
221221
} catch (TransportExceptionInterface $e) {
222-
try {
223-
$this->stop();
224-
} catch (TransportExceptionInterface $e) {
225-
}
222+
$this->stop();
226223
}
227224
}
228225

SmtpTransport.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,7 @@ private function ping(): void
219219
try {
220220
$this->executeCommand("NOOP\r\n", [250]);
221221
} catch (TransportExceptionInterface $e) {
222-
try {
223-
$this->stop();
224-
} catch (TransportExceptionInterface $e) {
225-
}
222+
$this->stop();
226223
}
227224
}
228225

Transport/Smtp/SmtpTransport.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,7 @@ private function ping(): void
219219
try {
220220
$this->executeCommand("NOOP\r\n", [250]);
221221
} catch (TransportExceptionInterface $e) {
222-
try {
223-
$this->stop();
224-
} catch (TransportExceptionInterface $e) {
225-
}
222+
$this->stop();
226223
}
227224
}
228225

0 commit comments

Comments
 (0)