Browse Source

[2903] added more detailed explanation of when post() can throw

JINMEI Tatuya 12 years ago
parent
commit
73bdf354a0
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/lib/asiodns/tcp_server.cc

+ 5 - 1
src/lib/asiodns/tcp_server.cc

@@ -288,7 +288,11 @@ void TCPServer::stop() {
 void
 TCPServer::resume(const bool done) {
     done_ = done;
-    io_.post(*this);  // this can throw, but can be considered fatal.
+
+    // post() can throw due to memory allocation failure, but as like other
+    // cases of the entire BIND 10 implementation, we consider it fatal and
+    // let the exception be propagated.
+    io_.post(*this);
 }
 
 } // namespace asiodns