You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2019/01/29 03:39:59 UTC

[trafficserver] branch quic-latest updated: HTTP/3: Handle error on creating uni stream

This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
     new 393b90b  HTTP/3: Handle error on creating uni stream
393b90b is described below

commit 393b90b4ae8911fac6ddfa5cbb71c56bd2abb82a
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Jan 29 12:39:41 2019 +0900

    HTTP/3: Handle error on creating uni stream
---
 proxy/http3/Http3App.cc | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/proxy/http3/Http3App.cc b/proxy/http3/Http3App.cc
index d0f8271..257f3ad 100644
--- a/proxy/http3/Http3App.cc
+++ b/proxy/http3/Http3App.cc
@@ -61,16 +61,23 @@ void
 Http3App::start()
 {
   QUICStreamId stream_id;
+  QUICConnectionErrorUPtr error;
 
-  this->create_uni_stream(stream_id, Http3StreamType::CONTROL);
-  this->_local_control_stream = this->_find_stream_io(stream_id);
-  this->_handle_uni_stream_on_write_ready(VC_EVENT_WRITE_READY, this->_local_control_stream);
+  error = this->create_uni_stream(stream_id, Http3StreamType::CONTROL);
+  if (error == nullptr) {
+    this->_local_control_stream = this->_find_stream_io(stream_id);
+    this->_handle_uni_stream_on_write_ready(VC_EVENT_WRITE_READY, this->_local_control_stream);
+  }
 
-  this->create_uni_stream(stream_id, Http3StreamType::QPACK_ENCODER);
-  this->_handle_uni_stream_on_write_ready(VC_EVENT_WRITE_READY, this->_find_stream_io(stream_id));
+  error = this->create_uni_stream(stream_id, Http3StreamType::QPACK_ENCODER);
+  if (error == nullptr) {
+    this->_handle_uni_stream_on_write_ready(VC_EVENT_WRITE_READY, this->_find_stream_io(stream_id));
+  }
 
-  this->create_uni_stream(stream_id, Http3StreamType::QPACK_DECODER);
-  this->_handle_uni_stream_on_write_ready(VC_EVENT_WRITE_READY, this->_find_stream_io(stream_id));
+  error = this->create_uni_stream(stream_id, Http3StreamType::QPACK_DECODER);
+  if (error == nullptr) {
+    this->_handle_uni_stream_on_write_ready(VC_EVENT_WRITE_READY, this->_find_stream_io(stream_id));
+  }
 }
 
 int
@@ -131,7 +138,7 @@ Http3App::create_uni_stream(QUICStreamId &new_stream_id, Http3StreamType type)
 
     Debug("http3", "[%llu] %s stream is created", new_stream_id, Http3DebugNames::stream_type(type));
   } else {
-    ink_abort("Could not creat %s stream", Http3DebugNames::stream_type(type));
+    Debug("http3", "Could not creat %s stream", Http3DebugNames::stream_type(type));
   }
 
   return error;