From: Charles-Henri Bruyand Date: Fri, 22 Sep 2023 10:17:46 +0000 (+0200) Subject: doq: fix formating X-Git-Tag: rec-5.0.0-alpha2~6^2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=357b3faaad68a7763c3a9b33da1912dfc0c1e537;p=thirdparty%2Fpdns.git doq: fix formating --- diff --git a/pdns/dnsdistdist/doq.cc b/pdns/dnsdistdist/doq.cc index 0617ffcd86..a1ce4c6478 100644 --- a/pdns/dnsdistdist/doq.cc +++ b/pdns/dnsdistdist/doq.cc @@ -73,7 +73,6 @@ struct DOQServerConfig d_responseSender = std::move(sender); d_responseReceiver = std::move(receiver); } - } DOQServerConfig(const DOQServerConfig&) = delete; DOQServerConfig(DOQServerConfig&&) = default; @@ -440,7 +439,8 @@ static void sendBackDOQUnit(DOQUnitUniquePtr&& du, const char* description) if (!du->dsc->d_responseSender.send(std::move(du))) { vinfolog("Unable to pass a %s to the DoQ worker thread because the pipe is full", description); } - } catch (const std::exception& e) { + } + catch (const std::exception& e) { vinfolog("Unable to pass a %s to the DoQ worker thread because we couldn't write to the pipe: %s", description, e.what()); } } @@ -676,18 +676,17 @@ static void doq_dispatch_query(DOQServerConfig& dsc, PacketBuffer&& query, const static void flushResponses(pdns::channel::Receiver& receiver) { - for(;;) { + for (;;) { try { auto tmp = receiver.receive(); if (!tmp) { - return ; + return; } auto du = std::move(*tmp); auto conn = getConnection(du->serverConnID); handleResponse(*du->dsc->df, *conn, du->streamID, du->response); - } catch (const std::exception& e) { errlog("Error while processing response received over DoQ: %s", e.what()); diff --git a/pdns/dnsdistdist/doq.hh b/pdns/dnsdistdist/doq.hh index 112fa09751..c2ebb685e3 100644 --- a/pdns/dnsdistdist/doq.hh +++ b/pdns/dnsdistdist/doq.hh @@ -48,7 +48,7 @@ struct DOQFrontend #ifdef __linux__ // On Linux this gives us 128k pending queries (default is 8192 queries), // which should be enough to deal with huge spikes - uint32_t d_internalPipeBufferSize{1024*1024}; + uint32_t d_internalPipeBufferSize{1024 * 1024}; #else uint32_t d_internalPipeBufferSize{0}; #endif