quic: fixup linting/formatting issues · nodejs/node@21e9239
@@ -455,8 +455,8 @@ class Http3ApplicationImpl final : public Session::Application {
455455 }
456456457457void SetStreamPriority(const Stream& stream,
458- StreamPriority priority,
459- StreamPriorityFlags flags) override {
458+ StreamPriority priority,
459+ StreamPriorityFlags flags) override {
460460 nghttp3_pri pri;
461461 pri.inc = (flags == StreamPriorityFlags::NON_INCREMENTAL) ? 0 : 1;
462462switch (priority) {
@@ -471,8 +471,7 @@ class Http3ApplicationImpl final : public Session::Application {
471471break;
472472 }
473473if (session().is_server()) {
474-nghttp3_conn_set_server_stream_priority(
475- *this, stream.id(), &pri);
474+nghttp3_conn_set_server_stream_priority(*this, stream.id(), &pri);
476475 }
477476// Client-side priority is set at request submission time via
478477// nghttp3_conn_submit_request and is not typically changed
@@ -536,12 +535,10 @@ class Http3ApplicationImpl final : public Session::Application {
536535nghttp3_err_infer_quic_app_error_code(err)));
537536return false;
538537 }
539-if (data->stream)
540- data->stream->Commit(datalen, data->fin);
538+if (data->stream) data->stream->Commit(datalen, data->fin);
541539return true;
542540 }
543541544-545542SET_NO_MEMORY_INFO()
546543 SET_MEMORY_INFO_NAME(Http3ApplicationImpl)
547544 SET_SELF_SIZE(Http3ApplicationImpl)
@@ -724,9 +721,7 @@ class Http3ApplicationImpl final : public Session::Application {
724721//
725722// This can be called multiple times with a decreasing id as the
726723// peer progressively reduces the set of streams it will process.
727-Debug(&session(),
728-"HTTP/3 received GOAWAY (id=%" PRIi64 ")",
729- id);
724+Debug(&session(), "HTTP/3 received GOAWAY (id=%" PRIi64 ")", id);
730725session().Close(Session::CloseMethod::GRACEFUL);
731726 }
732727@@ -799,42 +794,38 @@ class Http3ApplicationImpl final : public Session::Application {
799794return 0;
800795 }
801796802-size_t max_count = std::min(veccnt,
803-static_cast<size_t>(kMaxVectorCount));
797+size_t max_count = std::min(veccnt, static_cast<size_t>(kMaxVectorCount));
804798 nghttp3_ssize result = 0;
805799806-auto next = [&](int status,
807-const ngtcp2_vec* data,
808-size_t count,
809- bob::Done done) {
810-switch (status) {
811-case bob::Status::STATUS_BLOCK:
812-case bob::Status::STATUS_WAIT:
813- result = NGHTTP3_ERR_WOULDBLOCK;
814-return;
815-case bob::Status::STATUS_EOS:
816- *pflags |= NGHTTP3_DATA_FLAG_EOF;
817-break;
818- }
819- count = std::min(count, max_count);
820-for (size_t n = 0; n < count; n++) {
821- vec[n].base = data[n].base;
822- vec[n].len = data[n].len;
823- }
824- result = static_cast<nghttp3_ssize>(count);
825- };
800+auto next =
801+ [&](int status, const ngtcp2_vec* data, size_t count, bob::Done done) {
802+switch (status) {
803+case bob::Status::STATUS_BLOCK:
804+case bob::Status::STATUS_WAIT:
805+ result = NGHTTP3_ERR_WOULDBLOCK;
806+return;
807+case bob::Status::STATUS_EOS:
808+ *pflags |= NGHTTP3_DATA_FLAG_EOF;
809+break;
810+ }
811+ count = std::min(count, max_count);
812+for (size_t n = 0; n < count; n++) {
813+ vec[n].base = data[n].base;
814+ vec[n].len = data[n].len;
815+ }
816+ result = static_cast<nghttp3_ssize>(count);
817+ };
826818827819 ngtcp2_vec data[kMaxVectorCount];
828820 stream->Pull(std::move(next),
829- bob::Options::OPTIONS_SYNC,
830- data,
831- max_count,
832- max_count);
821+ bob::Options::OPTIONS_SYNC,
822+ data,
823+ max_count,
824+ max_count);
833825834826return result;
835827 }
836828837-838829static int on_acked_stream_data(nghttp3_conn* conn,
839830int64_t stream_id,
840831uint64_t datalen,