summaryrefslogtreecommitdiff
path: root/tftpy/TftpClient.py
diff options
context:
space:
mode:
authorFabian Knittel <fabian.knittel@avona.com>2008-07-31 02:33:01 +0200
committerFabian Knittel <fabian.knittel@avona.com>2008-11-10 02:36:12 +0100
commit21055d3f2300c6884b7d426268c56ba7a781d711 (patch)
tree9641aff1eeccb2ff7b111bca05f176c08d7281cc /tftpy/TftpClient.py
parent89515880270e4bc3eaaf91fa5821122106e90c42 (diff)
downloadtftpy-fabian-patches.tar.gz
tftpy/TftpClient.py: Discard port and socket after transfer completionfabian-patches
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.
Diffstat (limited to 'tftpy/TftpClient.py')
-rw-r--r--tftpy/TftpClient.py4
1 files changed, 4 insertions, 0 deletions
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: