BIND 10 trac1321, updated. e9a7f0106db4f30af9f64e663d39db262850f153 Close sockets when done with them
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Mar 14 07:58:50 UTC 2012
The branch, trac1321 has been updated
via e9a7f0106db4f30af9f64e663d39db262850f153 (commit)
from 5043998b29c17dd31a06cdfa9bcd73eb2832127b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e9a7f0106db4f30af9f64e663d39db262850f153
Author: Mukund Sivaraman <muks at isc.org>
Date: Wed Mar 14 13:20:57 2012 +0530
Close sockets when done with them
-----------------------------------------------------------------------
Summary of changes:
src/lib/python/isc/notify/notify_out.py | 2 ++
src/lib/python/isc/notify/tests/notify_out_test.py | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/notify/notify_out.py b/src/lib/python/isc/notify/notify_out.py
index 589bf60..6f3bec9 100644
--- a/src/lib/python/isc/notify/notify_out.py
+++ b/src/lib/python/isc/notify/notify_out.py
@@ -253,7 +253,9 @@ class NotifyOut:
self._thread.join()
# Clean up
+ self._write_sock.close()
self._write_sock = None
+ self._read_sock.close()
self._read_sock = None
self._thread = None
diff --git a/src/lib/python/isc/notify/tests/notify_out_test.py b/src/lib/python/isc/notify/tests/notify_out_test.py
index f14eebd..1b3a4a1 100644
--- a/src/lib/python/isc/notify/tests/notify_out_test.py
+++ b/src/lib/python/isc/notify/tests/notify_out_test.py
@@ -195,6 +195,11 @@ class TestNotifyOut(unittest.TestCase):
# Now make one socket be readable
self._notify._notify_infos[('example.net.', 'IN')].notify_timeout = time.time() + 10
self._notify._notify_infos[('example.com.', 'IN')].notify_timeout = time.time() + 10
+
+ if self._notify._read_sock is not None:
+ self._notify._read_sock.close()
+ if self._notify._write_sock is not None:
+ self._notify._write_sock.close()
self._notify._read_sock, self._notify._write_sock = socket.socketpair()
self._notify._write_sock.send(SOCK_DATA)
replied_zones, timeout_zones = self._notify._wait_for_notify_reply()
More information about the bind10-changes
mailing list