Fix issue #21641: Close the socket before raising the SMTPResponseException. Fixes the ResourceWarning in the test run.

Patch by Claudiu.Popa.
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index ec43666..759b77e 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -377,6 +377,7 @@
             if self.debuglevel > 0:
                 print('reply:', repr(line), file=stderr)
             if len(line) > _MAXLINE:
+                self.close()
                 raise SMTPResponseException(500, "Line too long.")
             resp.append(line[4:].strip(b' \t\r\n'))
             code = line[:3]