Skip to content
Snippets Groups Projects
Commit a032f50a authored by Adrien Béraud's avatar Adrien Béraud
Browse files

dht: catch all network engine errors

parent 8ee0d83a
No related branches found
No related tags found
No related merge requests found
...@@ -2256,8 +2256,8 @@ Dht::processMessage(const uint8_t *buf, size_t buflen, const sockaddr *from, soc ...@@ -2256,8 +2256,8 @@ Dht::processMessage(const uint8_t *buf, size_t buflen, const sockaddr *from, soc
try { try {
network_engine.processMessage(buf, buflen, from, fromlen); network_engine.processMessage(buf, buflen, from, fromlen);
} catch (DhtProtocolException& e) { } catch (const std::exception& e) {
DHT_LOG.ERROR("Can't parse message from %s: %s", e.getNodeId().toString().c_str(), e.what()); DHT_LOG.ERROR("Can't parse message from %s: %s", print_addr(from, fromlen).c_str(), e.what());
//auto code = e.getCode(); //auto code = e.getCode();
//if (code == DhtProtocolException::INVALID_TID_SIZE or code == DhtProtocolException::WRONG_NODE_INFO_BUF_LEN) { //if (code == DhtProtocolException::INVALID_TID_SIZE or code == DhtProtocolException::WRONG_NODE_INFO_BUF_LEN) {
/* This is really annoying, as it means that we will /* This is really annoying, as it means that we will
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment