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 2018/01/15 07:21:49 UTC
[trafficserver] branch quic-latest updated: Switch to draining
state on idle timeout
This is an automated email from the ASF dual-hosted git repository.
maskit 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 56fa13f Switch to draining state on idle timeout
56fa13f is described below
commit 56fa13fdd531561ecec4e2e643dc3bc7f79d2a63
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Mon Jan 15 16:21:01 2018 +0900
Switch to draining state on idle timeout
---
iocore/net/QUICNetVConnection.cc | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 473133e..df1afe1 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -513,14 +513,6 @@ QUICNetVConnection::state_connection_draining(int event, Event *data)
SCOPED_MUTEX_LOCK(lock, this->mutex, this_ethread());
bool can_switch_to_close_state = false;
- // This states SHOULD persist for three times the
- // current Retransmission Timeout (RTO) interval as defined in
- // [QUIC-RECOVERY].
-
- // TODO The draining period should be obtained from QUICLossDetector since it is the only component that knows the RTO interval.
- // Use 3 times kkMinRTOTimeout(200ms) for now.
- this->_schedule_draining_timeout(HRTIME_MSECONDS(3 * 200));
-
QUICErrorUPtr error = QUICErrorUPtr(new QUICNoError());
switch (event) {
case QUIC_EVENT_PACKET_READ_READY:
@@ -1179,6 +1171,14 @@ QUICNetVConnection::_switch_to_draining_state(QUICConnectionErrorUPtr error)
}
QUICConDebug("Enter state_connection_draining");
SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_connection_draining);
+
+ // This states SHOULD persist for three times the
+ // current Retransmission Timeout (RTO) interval as defined in
+ // [QUIC-RECOVERY].
+
+ // TODO The draining period should be obtained from QUICLossDetector since it is the only component that knows the RTO interval.
+ // Use 3 times kkMinRTOTimeout(200ms) for now.
+ this->_schedule_draining_timeout(HRTIME_MSECONDS(3 * 200));
}
void
@@ -1196,7 +1196,7 @@ void
QUICNetVConnection::_handle_idle_timeout()
{
this->remove_from_active_queue();
- this->close(std::make_unique<QUICConnectionError>(QUICTransErrorCode::NO_ERROR, "Idle Timeout"));
+ this->_switch_to_draining_state(std::make_unique<QUICConnectionError>(QUICTransErrorCode::NO_ERROR, "Idle Timeout"));
// TODO: signal VC_EVENT_ACTIVE_TIMEOUT/VC_EVENT_INACTIVITY_TIMEOUT to application
}
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].