]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2494] Add error log for async mode too
authorJelte Jansen <jelte@isc.org>
Thu, 13 Dec 2012 22:07:00 +0000 (23:07 +0100)
committerJelte Jansen <jelte@isc.org>
Thu, 13 Dec 2012 22:11:16 +0000 (23:11 +0100)
src/lib/asiodns/asiodns_messages.mes
src/lib/asiodns/udp_server.cc

index e4d0ead4f7643bae5369756af57ae5abf903141c..db2902ec657a21347cebab7bb6c1079e96c9fa0a 100644 (file)
@@ -53,17 +53,22 @@ The asynchronous I/O code encountered an error when trying to send data to
 the specified address on the given protocol.  The number of the system
 error that caused the problem is given in the message.
 
-% ASIODNS_UDP_SYNC_SEND_FAIL Error sending UDP packet to %1: %2
+% ASIODNS_UDP_ASYNC_SEND_FAIL Error sending UDP packet to %1: %2
 The low-level ASIO library reported an error when trying to send a UDP
-packet in synchronous UDP mode. This can be any error reported by send_to(),
-and can indicate problems such as too high a load on the network, or a
-problem in the underlying library or system.
+packet in asynchronous UDP mode. This can be any error reported by
+send_to(), and can indicate problems such as too high a load on the network,
+or a problem in the underlying library or system.
 This packet is dropped and will not be sent, but service should resume
 normally.
 If you see a single occurrence of this message, it probably does not
 indicate any significant problem, but if it is logged often, it is probably
 a good idea to inspect your network traffic.
 
+% ASIODNS_UDP_SYNC_SEND_FAIL Error sending UDP packet to %1: %2
+The low-level ASIO library reported an error when trying to send a UDP
+packet in synchronous UDP mode. See ASIODNS_UDP_ASYNC_SEND_FAIL for
+more information.
+
 % ASIODNS_UNKNOWN_ORIGIN unknown origin for ASIO error code %1 (protocol: %2, address %3)
 An internal consistency check on the origin of a message from the
 asynchronous I/O module failed. This may indicate an internal error;
index 8695e60083760a94ab638a9ac74d0bb42176c4e0..bdf79a73255c69a50dc625202955f2f2acb33285 100644 (file)
@@ -304,6 +304,11 @@ UDPServer::operator()(asio::error_code ec, size_t length) {
         CORO_YIELD data_->socket_->async_send_to(
             buffer(data_->respbuf_->getData(), data_->respbuf_->getLength()),
             *data_->sender_, *this);
+        if (ec) {
+            LOG_ERROR(logger, ASIODNS_UDP_ASYNC_SEND_FAIL).
+                      arg(data_->sender_->address().to_string()).
+                      arg(ec.message());
+        }
     }
 }