From 6fd9391ad86fe58cf73dabce452d5d14c0d9ac32 Mon Sep 17 00:00:00 2001 From: "Michael P. Soulier" Date: Thu, 2 Jun 2011 22:31:55 -0400 Subject: Fixing a file descriptor leak. Closes issue 22. --- run_tests | 3 +++ tftpy/TftpStates.py | 1 + 2 files changed, 4 insertions(+) create mode 100755 run_tests diff --git a/run_tests b/run_tests new file mode 100755 index 0000000..3dc0ecd --- /dev/null +++ b/run_tests @@ -0,0 +1,3 @@ +#!/bin/sh + +PYTHONPATH=. python t/test.py diff --git a/tftpy/TftpStates.py b/tftpy/TftpStates.py index 142029c..6c77499 100644 --- a/tftpy/TftpStates.py +++ b/tftpy/TftpStates.py @@ -156,6 +156,7 @@ class TftpContext(object): continue break else: + self.sock.close() raise TftpException, "Hit max timeouts, giving up." # Ok, we've received a packet. Log it. -- cgit v1.2.1