BIND 10 trac1454, updated. df7eb5eab53ef88f7cfe704aaa72fc1218cb7f95 [1454] Rests of renaming

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Jan 23 16:09:46 UTC 2012


The branch, trac1454 has been updated
       via  df7eb5eab53ef88f7cfe704aaa72fc1218cb7f95 (commit)
       via  b8fec5c4dd4b0280dd393c10718f516217435efe (commit)
       via  4209099e4baeab29615cc28208f1ca8889ca71ad (commit)
      from  6f19208c5954d030c0b9795fe399c4ef1e11c8c4 (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 df7eb5eab53ef88f7cfe704aaa72fc1218cb7f95
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Mon Jan 23 17:05:57 2012 +0100

    [1454] Rests of renaming
    
    There were two instances left the last time.

commit b8fec5c4dd4b0280dd393c10718f516217435efe
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Mon Jan 23 17:05:16 2012 +0100

    [1454] Reorder logging
    
    So the close happens every time.

commit 4209099e4baeab29615cc28208f1ca8889ca71ad
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Mon Jan 23 17:01:38 2012 +0100

    [1454] Comment update
    
    It got outdated and inaccurate.

-----------------------------------------------------------------------

Summary of changes:
 src/bin/ddns/ddns.py.in         |   17 +++++++++--------
 src/bin/ddns/tests/ddns_test.py |    2 +-
 2 files changed, 10 insertions(+), 9 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/ddns/ddns.py.in b/src/bin/ddns/ddns.py.in
index 7e855f8..ef2ae23 100755
--- a/src/bin/ddns/ddns.py.in
+++ b/src/bin/ddns/ddns.py.in
@@ -171,7 +171,7 @@ class DDNSServer:
 
     def handle_session(self, fileno):
         """
-        Handle incoming event on the socket with given fileno.
+        Handle incoming session on the socket with given fileno.
         """
         logger.debug(TRACE_BASIC, DDNS_SESSION, fileno)
         (socket, receiver) = self._socksession_receivers[fileno]
@@ -180,9 +180,9 @@ class DDNSServer:
         except isc.util.io.socketsession.SocketSessionError as se:
             # No matter why this failed, the connection is in unknown, possibly
             # broken state. So, we close the socket and remove the receiver.
-            logger.warn(DDNS_DROP_CONN, fileno, se)
-            socket.close()
             del self._socksession_receivers[fileno]
+            socket.close()
+            logger.warn(DDNS_DROP_CONN, fileno, se)
 
     def run(self):
         '''
@@ -193,11 +193,12 @@ class DDNSServer:
         cc_fileno = self._cc.get_socket().fileno()
         listen_fileno = self._listen_socket.fileno()
         while not self._shutdown:
-            # We do not catch any exceptions here right now, but this would
-            # be a good place to catch any exceptions that b10-ddns can
-            # recover from. We currently have no exception hierarchy to
-            # make such a distinction easily, but once we do, this would
-            # be the place to catch.
+            # In this event loop we propage most of exceptions, which will
+            # subsequently kill the b10-ddns process, but ideally it would be
+            # better to catch any exceptions that b10-ddns can recover from.
+            # We currently have no exception hierarchy to make such a
+            # distinction easily, but once we do, we should catch and handle
+            # non fatal exceptions here and continue the process.
 
             try:
                 (reads, writes, exceptions) = \
diff --git a/src/bin/ddns/tests/ddns_test.py b/src/bin/ddns/tests/ddns_test.py
index daa8a38..5c35bed 100755
--- a/src/bin/ddns/tests/ddns_test.py
+++ b/src/bin/ddns/tests/ddns_test.py
@@ -241,7 +241,7 @@ class TestDDNSServer(unittest.TestCase):
         self.assertTrue(isinstance(receiver, FakeSessionReceiver))
         self.assertEqual(socket, receiver.socket())
 
-    def test_incoming_called(self):
+    def test_session_called(self):
         """
         Test the run calls handle_session when there's something on the
         socket.




More information about the bind10-changes mailing list