@@ -212,7 +212,6 @@ class Http3ApplicationImpl final : public Session::Application {
212212
213213 bool Start () override {
214214 if (started_) return true ;
215- started_ = true ;
216215 Debug (&session (), " Starting HTTP/3 application." );
217216
218217 const auto params = session ().remote_transport_params ();
@@ -246,15 +245,15 @@ class Http3ApplicationImpl final : public Session::Application {
246245 }
247246
248247 Debug (&session (), " Creating and binding HTTP/3 control streams" );
249- bool ret =
248+ started_ =
250249 session ().OpenUnidirectionalStream (&control_stream_id_) &&
251250 session ().OpenUnidirectionalStream (&qpack_enc_stream_id_) &&
252251 session ().OpenUnidirectionalStream (&qpack_dec_stream_id_) &&
253252 nghttp3_conn_bind_control_stream (*this , control_stream_id_) == 0 &&
254253 nghttp3_conn_bind_qpack_streams (
255254 *this , qpack_enc_stream_id_, qpack_dec_stream_id_) == 0 ;
256255
257- if (env ()->enabled_debug_list ()->enabled (DebugCategory::QUIC ) && ret ) {
256+ if (env ()->enabled_debug_list ()->enabled (DebugCategory::QUIC ) && started_ ) {
258257 Debug (&session (),
259258 " Created and bound control stream %" PRIi64,
260259 control_stream_id_);
@@ -266,7 +265,7 @@ class Http3ApplicationImpl final : public Session::Application {
266265 qpack_dec_stream_id_);
267266 }
268267
269- return ret ;
268+ return started_ ;
270269 }
271270
272271 void BeginShutdown () override {
@@ -688,18 +687,16 @@ class Http3ApplicationImpl final : public Session::Application {
688687 offsetof (ngtcp2_vec, base) == offsetof (nghttp3_vec, base) &&
689688 offsetof (ngtcp2_vec, len) == offsetof (nghttp3_vec, len),
690689 " ngtcp2_vec and nghttp3_vec must have identical layout" );
691- data->count = kMaxVectorCount ;
692- ssize_t ret = 0 ;
693690 Debug (&session (), " HTTP/3 application getting stream data" );
694691 if (conn_ && session ().max_data_left ()) {
695692 // nghttp3 reports fin through an int out-param; bridge it to the bool.
696693 int fin = 0 ;
697- ret =
694+ ssize_t ret =
698695 nghttp3_conn_writev_stream (*this ,
699696 &data->id ,
700697 &fin,
701698 reinterpret_cast <nghttp3_vec*>(data->data ),
702- data-> count );
699+ kMaxVectorCount );
703700 // A negative return value indicates an error.
704701 if (ret < 0 ) {
705702 return static_cast <int >(ret);
0 commit comments