One useless test due to the condition being always true,
and one uncatched exception if we ever try to get the handle of a
non-established TCP connection which should never happen.
catch(const FDMultiplexerException& e) {
vinfolog("Got an exception when trying to remove a pending IO operation on the socket to the %s backend: %s", d_ds->getName(), e.what());
}
+ catch(const std::runtime_error& e) {
+ /* might be thrown by getHandle() */
+ vinfolog("Got an exception when trying to remove a pending IO operation on the socket to the %s backend: %s", d_ds->getName(), e.what());
+ }
}
}
unsigned int got = msgVec[msgIdx].msg_len;
const ComboAddress& remote = recvData[msgIdx].remote;
- if (got < 0 || static_cast<size_t>(got) < sizeof(struct dnsheader)) {
+ if (static_cast<size_t>(got) < sizeof(struct dnsheader)) {
++g_stats.nonCompliantQueries;
continue;
}