BIND 10 master, updated. 36208de9b48fdf61061554819f72a72258589f84 [master] Update changelog

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Mar 14 15:18:32 UTC 2011


The branch, master has been updated
       via  36208de9b48fdf61061554819f72a72258589f84 (commit)
       via  1d88daaa24e8b1ab27f28be876f40a144241e93b (commit)
       via  41ef6df597d8831d080d4dfc7c582f06e7f92511 (commit)
       via  bf57a576ff80578d47471569a48f0fbfd1fb6e2e (commit)
      from  4049550671160e2bbc06ca7e65996d0b7e243971 (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 36208de9b48fdf61061554819f72a72258589f84
Author: Jelte Jansen <jelte at isc.org>
Date:   Mon Mar 14 16:13:26 2011 +0100

    [master] Update changelog

commit 1d88daaa24e8b1ab27f28be876f40a144241e93b
Merge: 4049550671160e2bbc06ca7e65996d0b7e243971 41ef6df597d8831d080d4dfc7c582f06e7f92511
Author: Jelte Jansen <jelte at isc.org>
Date:   Mon Mar 14 16:12:28 2011 +0100

    Merge branch 'trac589'

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

Summary of changes:
 ChangeLog                      |    4 ++++
 src/lib/asiolink/tcp_server.cc |   10 ++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

-----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index 4294904..cc87bfa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+  200.  [bug]           Jelte
+	Fixed a bug where incoming TCP connections were not closed.
+	(Trac #589, git 1d88daaa24e8b1ab27f28be876f40a144241e93b)
+
   199.  [func]           ocean
 	Cache negative responses (NXDOMAIN/NODATA) from authoritative
 	server for recursive resolver.
diff --git a/src/lib/asiolink/tcp_server.cc b/src/lib/asiolink/tcp_server.cc
index 3e0cdb4..9bce8d8 100644
--- a/src/lib/asiolink/tcp_server.cc
+++ b/src/lib/asiolink/tcp_server.cc
@@ -115,6 +115,7 @@ TCPServer::operator()(error_code ec, size_t length) {
         CORO_YIELD async_read(*socket_, asio::buffer(data_.get(),
                               TCP_MESSAGE_LENGTHSIZE), *this);
         if (ec) {
+            socket_->close();
             CORO_YIELD return;
         }
 
@@ -127,6 +128,7 @@ TCPServer::operator()(error_code ec, size_t length) {
         }
 
         if (ec) {
+            socket_->close();
             CORO_YIELD return;
         }
 
@@ -160,6 +162,7 @@ TCPServer::operator()(error_code ec, size_t length) {
         // If we don't have a DNS Lookup provider, there's no point in
         // continuing; we exit the coroutine permanently.
         if (lookup_callback_ == NULL) {
+            socket_->close();
             CORO_YIELD return;
         }
 
@@ -177,6 +180,9 @@ TCPServer::operator()(error_code ec, size_t length) {
         // The 'done_' flag indicates whether we have an answer
         // to send back.  If not, exit the coroutine permanently.
         if (!done_) {
+            // TODO: should we keep the connection open for a short time
+            // to see if new requests come in?
+            socket_->close();
             CORO_YIELD return;
         }
 
@@ -195,6 +201,10 @@ TCPServer::operator()(error_code ec, size_t length) {
         // (though we have nothing further to do, so the coroutine
         // will simply exit at that time).
         CORO_YIELD async_write(*socket_, bufs, *this);
+        
+        // TODO: should we keep the connection open for a short time
+        // to see if new requests come in?
+        socket_->close();
     }
 }
 




More information about the bind10-changes mailing list