From e472c23a8c79b54383d4ad4dc58217471bc9e30e Mon Sep 17 00:00:00 2001 From: victor Date: Sun, 15 Nov 2009 08:09:55 +0000 Subject: [PATCH] has to be reworked git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@560 e16421f0-f15b-0410-abcd-98678b794739 --- sendrecv.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sendrecv.cpp b/sendrecv.cpp index 0c1bcad..fb8493e 100644 --- a/sendrecv.cpp +++ b/sendrecv.cpp @@ -94,7 +94,8 @@ void Channel::AddHandshake (Datagram& dgram) { void Channel::ClearStaleDataOut() { int oldsize = data_out_.size(); tint timeout = NOW - max( rtt_avg_-dev_avg_*4, 500*TINT_MSEC ); - while ( data_out_.size() && data_out_.front().time < timeout ) { + while ( data_out_.size() && data_out_.front().time < timeout && + ack_in_.get(data_out_.front().bin)==bins::EMPTY ) { dprintf("%s #%i Tdata %s\n",tintstr(),id,data_out_.front().bin.str()); data_out_.pop_front(); } -- 2.20.1