BIND 10 trac589, updated. 41ef6df597d8831d080d4dfc7c582f06e7f92511 [trac589] close the socket on errors too

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Mar 8 13:53:22 UTC 2011


The branch, trac589 has been updated
       via  41ef6df597d8831d080d4dfc7c582f06e7f92511 (commit)
      from  bf57a576ff80578d47471569a48f0fbfd1fb6e2e (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 41ef6df597d8831d080d4dfc7c582f06e7f92511
Author: Jelte Jansen <jelte at isc.org>
Date:   Tue Mar 8 14:42:54 2011 +0100

    [trac589] close the socket on errors too

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

Summary of changes:
 src/lib/asiolink/tcp_server.cc |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/asiolink/tcp_server.cc b/src/lib/asiolink/tcp_server.cc
index f1ad069..05a47e1 100644
--- a/src/lib/asiolink/tcp_server.cc
+++ b/src/lib/asiolink/tcp_server.cc
@@ -104,6 +104,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;
         }
 
@@ -116,6 +117,7 @@ TCPServer::operator()(error_code ec, size_t length) {
         }
 
         if (ec) {
+            socket_->close();
             CORO_YIELD return;
         }
 
@@ -149,6 +151,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;
         }
 




More information about the bind10-changes mailing list