diff options
Diffstat (limited to 'libtransport/src')
-rw-r--r-- | libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc index 446b9ef8e..5667b0640 100644 --- a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc +++ b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc @@ -82,6 +82,7 @@ RTCProducerSocket::RTCProducerSocket() bytesProductionRate_(INIT_PACKET_PRODUCTION_RATE * 1400), packetsProductionRate_(INIT_PACKET_PRODUCTION_RATE), perSecondFactor_(MILLI_IN_A_SEC / STATS_INTERVAL_DURATION), + timer_on_(false), active_(false) { lastStats_ = std::chrono::duration_cast<std::chrono::milliseconds>( std::chrono::steady_clock::now().time_since_epoch()) @@ -183,6 +184,7 @@ void RTCProducerSocket::produce(std::unique_ptr<utils::MemBuf> &&buffer) { break; } } + seqs_map_.erase(it_seqs); } } @@ -214,9 +216,14 @@ void RTCProducerSocket::onInterest(Interest::Ptr &&interest) { } } + if(interestSeg > HICN_MAX_DATA_SEQ){ + sendNack(interestSeg, isActive); + return; + } + // if the production rate is less than MIN_PRODUCTION_RATE we put the // interest in a queue, otherwise we handle it in the usual way - if(bytesProductionRate_ < MIN_PRODUCTION_RATE){ + if(bytesProductionRate_ < MIN_PRODUCTION_RATE && interestSeg > currentSeg_){ utils::SpinLock::Acquire locked(interests_cache_lock_); @@ -269,11 +276,6 @@ void RTCProducerSocket::onInterest(Interest::Ptr &&interest) { return; } - if(interestSeg > HICN_MAX_DATA_SEQ){ - sendNack(interestSeg, isActive); - return; - } - if (TRANSPORT_EXPECT_FALSE(!isActive)) { sendNack(interestSeg, false); return; |