From: Victor Grishchenko Date: Tue, 19 Oct 2010 09:46:28 +0000 (+0200) Subject: the nap bug X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=27feb95f71e39ccc40a5878b954ecc63177a8065;p=swift-upb.git the nap bug --- diff --git a/send_control.cpp b/send_control.cpp index 599f844..130e9bd 100644 --- a/send_control.cpp +++ b/send_control.cpp @@ -73,7 +73,8 @@ tint Channel::KeepAliveNextSendTime () { return SwitchSendControl(SLOW_START_CONTROL); if (data_in_.time!=TINT_NEVER) return NOW; - send_interval_ <<= 1; + if (last_send_time_==NOW) + send_interval_ <<= 1; if (send_interval_>MAX_SEND_INTERVAL) send_interval_ = MAX_SEND_INTERVAL; return last_send_time_ + send_interval_;