Commit 974f8764 authored by Benjamin Peterson's avatar Benjamin Peterson

fix ftplib resource warnings

parent 8b838584
......@@ -361,6 +361,7 @@ class FTP:
conn, sockaddr = sock.accept()
if self.timeout is not _GLOBAL_DEFAULT_TIMEOUT:
conn.settimeout(self.timeout)
sock.close()
if resp[:3] == '150':
# this is conditional in case we received a 125
size = parse150(resp)
......
......@@ -355,6 +355,8 @@ if ssl is not None:
if (isinstance(self.socket, ssl.SSLSocket) and
self.socket._sslobj is not None):
self._do_ssl_shutdown()
else:
super(SSLConnection, self).close()
class DummyTLS_DTPHandler(SSLConnection, DummyDTPHandler):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment