]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#42, !103] Addressed two review comments. 42-congestion-handler-exp-1
authorMarcin Siodelski <marcin@isc.org>
Thu, 8 Nov 2018 13:22:05 +0000 (14:22 +0100)
committerMarcin Siodelski <marcin@isc.org>
Thu, 8 Nov 2018 13:22:05 +0000 (14:22 +0100)
Commentary for sleep(1) in case of the error condition in the IfaceMgr.
Also fixed one parameter name in the doxygen.

src/lib/dhcp/iface_mgr.cc
src/lib/dhcp/packet_queue.h

index 044fbb60813ea9c21c8d163e1dc503105ffb7ec0..8792b216e65b2b97efd3ae1c60a10c010995ca11 100644 (file)
@@ -1221,6 +1221,9 @@ void IfaceMgr::receiveDHCP4Packets() {
                 // Signal the error to receive4.
                 receiver_error_ = strerror(errno);
                 error_watch_.markReady();
+                // We need to sleep in case of the error condition to
+                // prevent the thread from tight looping when result
+                // gets negative.
                 sleep(1);
             }
             continue;
@@ -1303,6 +1306,9 @@ void IfaceMgr::receiveDHCP6Packets() {
                 // Signal the error to receive6.
                 receiver_error_ = strerror(errno);
                 error_watch_.markReady();
+                // We need to sleep in case of the error condition to
+                // prevent the thread from tight looping when result
+                // gets negative.
                 sleep(1);
             }
             continue;
index 32e2c4a95c2f47c4558653918d00f57f521c4b55..0d33a4ef26c33f8aac6c9708729a2b574cdf290d 100644 (file)
@@ -234,7 +234,7 @@ public:
     /// @brief Constructor
     ///
     /// @param queue_type logical name of the queue implementation
-    /// @param queue_capacity maximum number of packets the queue can hold
+    /// @param capacity maximum number of packets the queue can hold
     PacketQueueRing(const std::string& queue_type, size_t capacity)
         : PacketQueue<PacketTypePtr>(queue_type) {
         queue_.set_capacity(capacity);