]> p2p-next.cs.pub.ro Git - swift-upb.git/commitdiff
precaution
authorVictor Grishchenko <victor.grishchenko@gmail.com>
Fri, 26 Feb 2010 17:37:49 +0000 (18:37 +0100)
committerVictor Grishchenko <victor.grishchenko@gmail.com>
Fri, 26 Feb 2010 17:37:49 +0000 (18:37 +0100)
send_control.cpp
sendrecv.cpp

index a1d11549db2dbfbe8dbd1b38821fef930dba16d0..005b70c28b3455ff157bde4f581d5d1ac941e004 100644 (file)
@@ -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();
index bfe1ee7d861136bc2e35780103526f1e45925fd5..5fa703e2006e71f1f067c8a945c90ca3aef2a8cf 100644 (file)
@@ -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_<NOW+TINT_MIN);