From a032f50a27244a2c5b57bd334004a795826254d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Wed, 18 May 2016 17:39:00 -0400
Subject: [PATCH] dht: catch all network engine errors

---
 src/dht.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/dht.cpp b/src/dht.cpp
index 596c61c2..260a4854 100644
--- a/src/dht.cpp
+++ b/src/dht.cpp
@@ -2256,8 +2256,8 @@ Dht::processMessage(const uint8_t *buf, size_t buflen, const sockaddr *from, soc
 
     try {
         network_engine.processMessage(buf, buflen, from, fromlen);
-    } catch (DhtProtocolException& e) {
-        DHT_LOG.ERROR("Can't parse message from %s: %s", e.getNodeId().toString().c_str(), e.what());
+    } catch (const std::exception& e) {
+        DHT_LOG.ERROR("Can't parse message from %s: %s", print_addr(from, fromlen).c_str(), e.what());
         //auto code = e.getCode();
         //if (code == DhtProtocolException::INVALID_TID_SIZE or code == DhtProtocolException::WRONG_NODE_INFO_BUF_LEN) {
             /* This is really annoying, as it means that we will
-- 
GitLab