minus cwnd drop bug
authorvictor <victor@e16421f0-f15b-0410-abcd-98678b794739>
Mon, 9 Nov 2009 17:44:29 +0000 (17:44 +0000)
committervictor <victor@e16421f0-f15b-0410-abcd-98678b794739>
Mon, 9 Nov 2009 17:44:29 +0000 (17:44 +0000)
git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@518 e16421f0-f15b-0410-abcd-98678b794739

sendrecv.cpp

index 1d27470..cf7ec6f 100644 (file)
@@ -125,11 +125,11 @@ void      Channel::Send () {
         AddAck(dgram);
     }
     dprintf("%s #%i sent %ib %s\n",tintstr(),id,dgram.size(),peer().str().c_str());
-       if (dgram.Send()==-1)
-        print_error("can't send datagram");
     if (dgram.size()==4) // only the channel id; bare keep-alive
         data = bin64_t::ALL;
     cc_->OnDataSent(data);
+       if (dgram.Send()==-1)
+        print_error("can't send datagram");
     last_send_time_ = NOW;
     RequeueSend(cc_->NextSendTime());
 }