From 62823760749a54b0d286444e94020af93fb2b0ba Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Mon, 8 Dec 2014 10:45:00 +0100 Subject: [PATCH] debug-log-message when there is unused data in buffer, which is probably reason for frequent broken packages --- src/icmp/icmppinger.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/icmp/icmppinger.cpp b/src/icmp/icmppinger.cpp index e0fa829..3329913 100644 --- a/src/icmp/icmppinger.cpp +++ b/src/icmp/icmppinger.cpp @@ -206,6 +206,8 @@ void IcmpPinger::handle_ping_done() void IcmpPinger::start_receive() { // Discard any data already in the buffer. + if (ReplyBuffer.size() > 0) + GlobalLogger.debug() << "consuming unused " << ReplyBuffer.size() << "bytes!" << endl; ReplyBuffer.consume( ReplyBuffer.size() ); // Waiting for a reply. We prepare the buffer to receive up to 64KB. -- 1.7.1