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/06/06 07:01:27 UTC
[trafficserver] branch quic-latest updated: Reset
QUICPacketRetransmitter when QUICNetVC discards all transport state
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 a111b9c Reset QUICPacketRetransmitter when QUICNetVC discards all transport state
a111b9c is described below
commit a111b9c585d5fcfb9bdb616fd1206a60d7dc63a7
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Wed Jun 6 16:00:47 2018 +0900
Reset QUICPacketRetransmitter when QUICNetVC discards all transport state
---
iocore/net/QUICNetVConnection.cc | 4 ++++
iocore/net/quic/QUICPacketRetransmitter.cc | 8 ++++++++
iocore/net/quic/QUICPacketRetransmitter.h | 1 +
3 files changed, 13 insertions(+)
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 3bf73aa..51e9d57 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -881,6 +881,8 @@ QUICNetVConnection::_state_handshake_process_version_negotiation_packet(QUICPack
this->_stream_manager->reset_send_offset();
this->_stream_manager->reset_recv_offset();
this->_loss_detector->reset();
+ SCOPED_MUTEX_LOCK(packet_transmitter_lock, this->_packet_transmitter_mutex, this_ethread());
+ this->_packet_retransmitter.reset();
// start handshake over
this->_handshake_handler->reset();
@@ -918,6 +920,8 @@ QUICNetVConnection::_state_handshake_process_retry_packet(QUICPacketUPtr packet)
// discard all transport state
this->_stream_manager->reset_send_offset();
this->_loss_detector->reset();
+ SCOPED_MUTEX_LOCK(packet_transmitter_lock, this->_packet_transmitter_mutex, this_ethread());
+ this->_packet_retransmitter.reset();
QUICErrorUPtr error = this->_recv_and_ack(std::move(packet));
diff --git a/iocore/net/quic/QUICPacketRetransmitter.cc b/iocore/net/quic/QUICPacketRetransmitter.cc
index 5fcd4a8..2186540 100644
--- a/iocore/net/quic/QUICPacketRetransmitter.cc
+++ b/iocore/net/quic/QUICPacketRetransmitter.cc
@@ -53,6 +53,14 @@ QUICPacketRetransmitter::retransmit_packet(const QUICPacket &packet)
}
}
+void
+QUICPacketRetransmitter::reset()
+{
+ while (!this->_retransmission_frames.empty()) {
+ this->_retransmission_frames.pop();
+ }
+}
+
bool
QUICPacketRetransmitter::will_generate_frame()
{
diff --git a/iocore/net/quic/QUICPacketRetransmitter.h b/iocore/net/quic/QUICPacketRetransmitter.h
index bef5efa..c468b85 100644
--- a/iocore/net/quic/QUICPacketRetransmitter.h
+++ b/iocore/net/quic/QUICPacketRetransmitter.h
@@ -32,6 +32,7 @@ class QUICPacketRetransmitter : public QUICFrameGenerator
{
public:
void retransmit_packet(const QUICPacket &packet);
+ void reset();
// QUICFrameGenerator
bool will_generate_frame() override;
--
To stop receiving notification emails like this one, please contact
masaori@apache.org.