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
commit 3bfc675a3b530903b4d75647a5c2cb32b2368471 Author: Masaori Koshiba <masa...@apache.org> AuthorDate: Tue Sep 12 16:47:24 2017 +0900 Schedule QUIC_EVENT_SHUTDOWN when change state to state_connection_closed --- iocore/net/QUICNetVConnection.cc | 8 +++----- iocore/net/quic/QUICEvents.h | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc index bbc5547..e34e055 100644 --- a/iocore/net/QUICNetVConnection.cc +++ b/iocore/net/QUICNetVConnection.cc @@ -291,6 +291,7 @@ QUICNetVConnection::handle_frame(std::shared_ptr<const QUICFrame> frame) case QUICFrameType::CONNECTION_CLOSE: DebugQUICCon("Enter state_connection_closed"); SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_connection_closed); + this_ethread()->schedule_imm(this, QUIC_EVENT_SHUTDOWN, nullptr); break; default: DebugQUICCon("Unexpected frame type: %02x", static_cast<unsigned int>(frame->type())); @@ -450,6 +451,7 @@ QUICNetVConnection::state_connection_closing(int event, Event *data) if (true) { DebugQUICCon("Enter state_connection_closed"); SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_connection_closed); + this_ethread()->schedule_imm(this, QUIC_EVENT_SHUTDOWN, nullptr); } return EVENT_DONE; @@ -459,11 +461,7 @@ int QUICNetVConnection::state_connection_closed(int event, Event *data) { switch (event) { - case QUIC_EVENT_PACKET_READ_READY: { - // TODO: send GOAWAY frame - break; - } - case QUIC_EVENT_PACKET_WRITE_READY: { + case QUIC_EVENT_SHUTDOWN: { this->_packet_write_ready = nullptr; this->next_inactivity_timeout_at = 0; this->next_activity_timeout_at = 0; diff --git a/iocore/net/quic/QUICEvents.h b/iocore/net/quic/QUICEvents.h index de27a78..b3273ce 100644 --- a/iocore/net/quic/QUICEvents.h +++ b/iocore/net/quic/QUICEvents.h @@ -23,10 +23,12 @@ #pragma once +#include "I_EventSystem.h" #include "I_Event.h" enum { QUIC_EVENT_PACKET_READ_READY = QUIC_EVENT_EVENTS_START, QUIC_EVENT_PACKET_WRITE_READY, + QUIC_EVENT_SHUTDOWN, QUIC_EVENT_LD_SHUTDOWN, }; -- To stop receiving notification emails like this one, please contact "commits@trafficserver.apache.org" <commits@trafficserver.apache.org>.