From cf8a1ee87956e12aa4d48d6584f6ff1f55227af6 Mon Sep 17 00:00:00 2001 From: Victor Grishchenko Date: Fri, 26 Feb 2010 18:37:49 +0100 Subject: [PATCH] precaution --- send_control.cpp | 1 + sendrecv.cpp | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/send_control.cpp b/send_control.cpp index a1d1154..005b70c 100644 --- a/send_control.cpp +++ b/send_control.cpp @@ -23,6 +23,7 @@ const char* Channel::SEND_CONTROL_MODES[] = {"keepalive", "pingpong", tint Channel::NextSendTime () { + TimeoutDataOut(); // precaution to know free cwnd switch (send_control_) { case KEEP_ALIVE_CONTROL: return KeepAliveNextSendTime(); case PING_PONG_CONTROL: return PingPongNextSendTime(); diff --git a/sendrecv.cpp b/sendrecv.cpp index bfe1ee7..5fa703e 100644 --- a/sendrecv.cpp +++ b/sendrecv.cpp @@ -256,7 +256,7 @@ void Channel::AddHave (Datagram& dgram) { void Channel::Recv (Datagram& dgram) { - dprintf("%s #%u recvd %i\n",tintstr(),id_,dgram.size()+4); + dprintf("%s #%u recvd %ib\n",tintstr(),id_,dgram.size()+4); dgrams_rcvd_++; if (last_send_time_ && rtt_avg_==TINT_SEC && dev_avg_==0) { rtt_avg_ = NOW - last_send_time_; @@ -569,7 +569,6 @@ void Channel::Close () { void Channel::Reschedule () { - TimeoutDataOut(); // precaution to know free cwnd next_send_time_ = NextSendTime(); if (next_send_time_!=TINT_NEVER) { assert(next_send_time_