continue waiting for data if receive handler received an error code
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Mon, 12 Jan 2015 14:41:04 +0000 (15:41 +0100)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Mon, 12 Jan 2015 14:41:04 +0000 (15:41 +0100)
2 reasons:
* in other error cases do the same
* there is a timer running in the background which will send the next ping after some time

src/icmp/icmppinger.cpp

index bcf73a5..a9eec4b 100644 (file)
@@ -266,7 +266,9 @@ void IcmpPinger::handle_receive_icmp_packet( const boost::system::error_code &er
     {
         GlobalLogger.warning()
            << DestinationEndpoint.address().to_string()
-           << ": Received error " << error << " in ICMP packet handler; end handler.";
+           << ": Received error " << error
+           << " in ICMP packet handler; end handler and schedule another.";
+        start_receive();
         return;
     }
     if ( ReplyReceived )