From 21055d3f2300c6884b7d426268c56ba7a781d711 Mon Sep 17 00:00:00 2001 From: Fabian Knittel Date: Thu, 31 Jul 2008 02:33:01 +0200 Subject: tftpy/TftpClient.py: Discard port and socket after transfer completion This patch explicitly discards the port and socket information of a connection as soon as the transfer is completed. Without the change, the client was not willing to process more than one subsequent download from within one client object. --- tftpy/TftpClient.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tftpy/TftpClient.py') diff --git a/tftpy/TftpClient.py b/tftpy/TftpClient.py index 5ce3b32..c854fa8 100644 --- a/tftpy/TftpClient.py +++ b/tftpy/TftpClient.py @@ -210,6 +210,10 @@ class TftpClient(TftpSession): # end while outputfile.close() + # The connection is closed. Discard socket and remote transfer port. + self.port = None + self.sock = None + end_time = time.time() duration = end_time - start_time if duration == 0: -- cgit v1.2.1