Skip to content

Commit 4da156a

Browse files
committed
Fix closing connection
1 parent 7b3c270 commit 4da156a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Transport/SmtpTransport.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ private function smtpCommand($command)
153153
public function __destruct()
154154
{
155155
$this->smtpCommand("QUIT");
156-
fclose($this->socket);
156+
if (is_resource($this->socket)) {
157+
fclose($this->socket);
158+
}
157159
}
158160
}

0 commit comments

Comments
 (0)