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 2017/12/18 05:11:45 UTC

[trafficserver] branch quic-latest updated: Resolve an deadlock issue on retrasnmission

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 bbd6818  Resolve an deadlock issue on retrasnmission
bbd6818 is described below

commit bbd681820940e62944052bc33884434b358db359
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Mon Dec 18 14:11:03 2017 +0900

    Resolve an deadlock issue on retrasnmission
---
 iocore/net/quic/QUICLossDetector.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/iocore/net/quic/QUICLossDetector.cc b/iocore/net/quic/QUICLossDetector.cc
index ac03c64..f162221 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -392,6 +392,8 @@ QUICLossDetector::_retransmit_handshake_packets()
 void
 QUICLossDetector::_send_one_packet()
 {
+  SCOPED_MUTEX_LOCK(transmitter_lock, this->_transmitter->get_packet_transmitter_mutex().get(), this_ethread());
+  SCOPED_MUTEX_LOCK(lock, this->mutex, this_ethread());
   if (this->_transmitter->transmit_packet() < 1) {
     auto ite = this->_sent_packets.rbegin();
     if (ite != this->_sent_packets.rend()) {
@@ -403,6 +405,8 @@ QUICLossDetector::_send_one_packet()
 void
 QUICLossDetector::_send_two_packets()
 {
+  SCOPED_MUTEX_LOCK(transmitter_lock, this->_transmitter->get_packet_transmitter_mutex().get(), this_ethread());
+  SCOPED_MUTEX_LOCK(lock, this->mutex, this_ethread());
   auto ite = this->_sent_packets.rbegin();
   if (ite != this->_sent_packets.rend()) {
     this->_transmitter->retransmit_packet(*ite->second->packet);

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].