You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/05/11 11:48:57 UTC
[trafficserver] branch master updated: Rename half_close_flag to
half_close_local_flag in Http2ClientSession
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 29e0d24 Rename half_close_flag to half_close_local_flag in Http2ClientSession
29e0d24 is described below
commit 29e0d24bfd817266e8bfa501d2a6db1de3626c19
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Thu May 11 10:09:14 2017 +0900
Rename half_close_flag to half_close_local_flag in Http2ClientSession
---
proxy/http2/Http2ClientSession.cc | 10 +++++-----
proxy/http2/Http2ClientSession.h | 16 ++++++++--------
proxy/http2/Http2ConnectionState.cc | 12 ++++++------
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/proxy/http2/Http2ClientSession.cc b/proxy/http2/Http2ClientSession.cc
index 99b08b2..1ecafc4 100644
--- a/proxy/http2/Http2ClientSession.cc
+++ b/proxy/http2/Http2ClientSession.cc
@@ -276,12 +276,12 @@ Http2ClientSession::reenable(VIO *vio)
}
void
-Http2ClientSession::set_half_close_flag(bool flag)
+Http2ClientSession::set_half_close_local_flag(bool flag)
{
- if (!half_close && flag) {
- DebugHttp2Ssn("session half-close");
+ if (!half_close_local && flag) {
+ DebugHttp2Ssn("session half-close local");
}
- half_close = flag;
+ half_close_local = flag;
}
int
@@ -494,7 +494,7 @@ Http2ClientSession::state_process_frame_read(int event, VIO *vio, bool inside_fr
SCOPED_MUTEX_LOCK(lock, this->connection_state.mutex, this_ethread());
if (!this->connection_state.is_state_closed()) {
this->connection_state.send_goaway_frame(this->connection_state.get_latest_stream_id_in(), err);
- this->set_half_close_flag(true);
+ this->set_half_close_local_flag(true);
this->do_io_close();
}
}
diff --git a/proxy/http2/Http2ClientSession.h b/proxy/http2/Http2ClientSession.h
index bc21661..872dc84 100644
--- a/proxy/http2/Http2ClientSession.h
+++ b/proxy/http2/Http2ClientSession.h
@@ -284,11 +284,11 @@ public:
return retval;
}
- void set_half_close_flag(bool flag) override;
+ void set_half_close_local_flag(bool flag);
bool
- get_half_close_flag() const override
+ get_half_close_local_flag() const
{
- return half_close;
+ return half_close_local;
}
private:
@@ -322,11 +322,11 @@ private:
// For Upgrade: h2c
Http2UpgradeContext upgrade_context;
- VIO *write_vio = nullptr;
- int dying_event = 0;
- bool kill_me = false;
- bool half_close = false;
- int recursion = 0;
+ VIO *write_vio = nullptr;
+ int dying_event = 0;
+ bool kill_me = false;
+ bool half_close_local = false;
+ int recursion = 0;
};
extern ClassAllocator<Http2ClientSession> http2ClientSessionAllocator;
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index 4aa61f1..e080656 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -906,7 +906,7 @@ Http2ConnectionState::main_event_handler(int event, void *edata)
error.msg);
}
this->send_goaway_frame(this->latest_streamid_in, error.code);
- this->ua_session->set_half_close_flag(true);
+ this->ua_session->set_half_close_local_flag(true);
this_ethread()->schedule_imm_local((Continuation *)this, HTTP2_SESSION_EVENT_FINI);
// The streams will be cleaned up by the HTTP2_SESSION_EVENT_FINI event
@@ -943,7 +943,7 @@ Http2ConnectionState::main_event_handler(int event, void *edata)
send_goaway_frame(latest_streamid_in, Http2ErrorCode::HTTP2_ERROR_NO_ERROR);
// Stop creating new streams
SCOPED_MUTEX_LOCK(lock, this->ua_session->mutex, this_ethread());
- this->ua_session->set_half_close_flag(true);
+ this->ua_session->set_half_close_local_flag(true);
} break;
default:
@@ -974,7 +974,7 @@ Http2Stream *
Http2ConnectionState::create_stream(Http2StreamId new_id, Http2Error &error)
{
// In half_close state, TS doesn't create new stream. Because GOAWAY frame is sent to client
- if (ua_session->get_half_close_flag()) {
+ if (ua_session->get_half_close_local_flag()) {
error = Http2Error(Http2ErrorClass::HTTP2_ERROR_CLASS_STREAM, Http2ErrorCode::HTTP2_ERROR_REFUSED_STREAM,
"refused to create new stream, because ua_session is in half_close state");
return nullptr;
@@ -1390,7 +1390,7 @@ Http2ConnectionState::send_headers_frame(Http2Stream *stream)
// Change stream state
if (!stream->change_state(HTTP2_FRAME_TYPE_HEADERS, flags)) {
this->send_goaway_frame(this->latest_streamid_in, Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR);
- this->ua_session->set_half_close_flag(true);
+ this->ua_session->set_half_close_local_flag(true);
this_ethread()->schedule_imm_local((Continuation *)this, HTTP2_SESSION_EVENT_FINI);
h2_hdr.destroy();
@@ -1551,7 +1551,7 @@ Http2ConnectionState::send_rst_stream_frame(Http2StreamId id, Http2ErrorCode ec)
if (stream != nullptr) {
if (!stream->change_state(HTTP2_FRAME_TYPE_RST_STREAM, 0)) {
this->send_goaway_frame(this->latest_streamid_in, Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR);
- this->ua_session->set_half_close_flag(true);
+ this->ua_session->set_half_close_local_flag(true);
this_ethread()->schedule_imm_local((Continuation *)this, HTTP2_SESSION_EVENT_FINI);
return;
@@ -1587,7 +1587,7 @@ Http2ConnectionState::send_settings_frame(const Http2ConnectionSettings &new_set
// Write settings to send buffer
if (!http2_write_settings(param, iov)) {
this->send_goaway_frame(this->latest_streamid_in, Http2ErrorCode::HTTP2_ERROR_INTERNAL_ERROR);
- this->ua_session->set_half_close_flag(true);
+ this->ua_session->set_half_close_local_flag(true);
this_ethread()->schedule_imm_local((Continuation *)this, HTTP2_SESSION_EVENT_FINI);
return;
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].