fix blacklisting for wrong reason.

This commit is contained in:
Simon Désaulniers authored and Adrien Béraud committed 2016-05-02 15:25:14 -04:00
1 parent 1e485b1b0c
commit 244877526f
2 files changed
+5 -4

No files matched your search

+2 -2
View File
@@ -123,7 +123,7 @@ NetworkEngine::processMessage(const uint8_t *buf, size_t buflen, const sockaddr
if (msg.tid.length != 4) {
DHT_LOG.ERROR("Broken node truncates transaction ids (len: %d): ", msg.tid.length);
DHT_LOG.ERROR.logPrintable(buf, buflen);
throw DhtProtocolException {DhtProtocolException::INVALID_REPLY_TID};
throw DhtProtocolException {DhtProtocolException::INVALID_TID_SIZE};
}
uint16_t ttid = 0;
@@ -136,7 +136,7 @@ NetworkEngine::processMessage(const uint8_t *buf, size_t buflen, const sockaddr
req = &(*reqp->second);
if (not req)
throw DhtProtocolException {DhtProtocolException::INVALID_REPLY_TID, "", msg.id};
throw DhtProtocolException {DhtProtocolException::UNKNOWN_TID, "Can't find transaction", msg.id};
switch (msg.type) {
case MessageType::Error: {