face: Properly handle error conditions in UdpChannel::newPeer

Change-Id: Ia34eb738a6cc8977bbcba91f0055fe4623df4d32
Refs: #2516
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index ffe6137..fd79d9d 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -163,7 +163,15 @@
 UdpChannel::newPeer(const boost::system::error_code& error,
                     size_t nBytesReceived)
 {
-  NFD_LOG_DEBUG("UdpChannel::newPeer from " << m_newRemoteEndpoint);
+  if (error) {
+    if (error == boost::asio::error::operation_aborted)
+      return;
+
+    NFD_LOG_ERROR("newPeer: " << error.message());
+    return;
+  }
+
+  NFD_LOG_DEBUG("newPeer from " << m_newRemoteEndpoint);
 
   shared_ptr<UdpFace> face;