Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions iocore/net/P_QUICNetVConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ class QUICNetVConnection : public UnixNetVConnection,

void _handle_periodic_ack_event();
void _handle_idle_timeout();
void _handle_active_timeout();

QUICConnectionErrorUPtr _handle_frame(const QUICNewConnectionIdFrame &frame);

Expand Down
20 changes: 20 additions & 0 deletions iocore/net/QUICNetVConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,10 @@ QUICNetVConnection::state_handshake(int event, Event *data)
// Start Immediate Close because of Idle Timeout
this->_handle_idle_timeout();
break;
case VC_EVENT_ACTIVE_TIMEOUT:
// Start Immediate Close
this->_handle_active_timeout();
break;
default:
QUICConDebug("Unexpected event: %s (%d)", QUICDebugNames::quic_event(event), event);
}
Expand Down Expand Up @@ -874,6 +878,10 @@ QUICNetVConnection::state_connection_established(int event, Event *data)
// Start Immediate Close because of Idle Timeout
this->_handle_idle_timeout();
break;
case VC_EVENT_ACTIVE_TIMEOUT:
// Start Immediate Close
this->_handle_active_timeout();
break;
default:
QUICConDebug("Unexpected event: %s (%d)", QUICDebugNames::quic_event(event), event);
}
Expand Down Expand Up @@ -906,6 +914,9 @@ QUICNetVConnection::state_connection_closing(int event, Event *data)
break;
case QUIC_EVENT_STATELESS_RESET:
break;
case VC_EVENT_ACTIVE_TIMEOUT:
// Do nothing because closing is in progress
break;
case QUIC_EVENT_ACK_PERIODIC:
default:
QUICConDebug("Unexpected event: %s (%d)", QUICDebugNames::quic_event(event), event);
Expand Down Expand Up @@ -936,6 +947,9 @@ QUICNetVConnection::state_connection_draining(int event, Event *data)
break;
case QUIC_EVENT_STATELESS_RESET:
break;
case VC_EVENT_ACTIVE_TIMEOUT:
// Do nothing because closing is in progress
break;
case QUIC_EVENT_ACK_PERIODIC:
default:
QUICConDebug("Unexpected event: %s (%d)", QUICDebugNames::quic_event(event), event);
Expand Down Expand Up @@ -2177,6 +2191,12 @@ QUICNetVConnection::_handle_idle_timeout()
// TODO: signal VC_EVENT_ACTIVE_TIMEOUT/VC_EVENT_INACTIVITY_TIMEOUT to application
}

void
QUICNetVConnection::_handle_active_timeout()
{
this->close_quic_connection(std::make_unique<QUICConnectionError>(QUICTransErrorCode::NO_ERROR, "Active Timeout"));
}

void
QUICNetVConnection::_validate_new_path(const QUICPath &path)
{
Expand Down