while (true) {
ComboAddress client;
buffer.resize(4096);
- if (!sock.recvFromAsync(buffer, client) || buffer.size() == 0) {
+ if (!sock.recvFromAsync(buffer, client) || buffer.empty()) {
return;
}
DEBUGLOG("Received DoH3 datagram of size "<<buffer.size()<<" from "<<client.toStringWithPort());
streamBuffer.resize(existingLength);
return;
}
- else if (received < 0) {
+ if (received < 0) {
++dnsdist::metrics::g_stats.nonCompliantQueries;
++clientState.nonCompliantQueries;
quiche_conn_stream_shutdown(conn.d_conn.get(), streamID, QUICHE_SHUTDOWN_WRITE, static_cast<uint64_t>(DOQ_Error_Codes::DOQ_PROTOCOL_ERROR));
while (true) {
ComboAddress client;
buffer.resize(4096);
- if (!sock.recvFromAsync(buffer, client) || buffer.size() == 0) {
+ if (!sock.recvFromAsync(buffer, client) || buffer.empty()) {
return;
}
DEBUGLOG("Received DoQ datagram of size "<<buffer.size()<<" from "<<client.toStringWithPort());