diff options
Diffstat (limited to 'libtransport')
-rw-r--r-- | libtransport/src/hicn/transport/protocols/raaqm.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libtransport/src/hicn/transport/protocols/raaqm.cc b/libtransport/src/hicn/transport/protocols/raaqm.cc index 21a59bc9a..a57eb7cd9 100644 --- a/libtransport/src/hicn/transport/protocols/raaqm.cc +++ b/libtransport/src/hicn/transport/protocols/raaqm.cc @@ -567,7 +567,8 @@ void RaaqmTransportProtocol::RAAQM() { // Change drop probability according to RTT statistics cur_path_->updateDropProb(); - if (std::rand() % 10000 <= cur_path_->getDropProb() * 10000) { + double coin = ((double) rand() / (RAND_MAX)); + if (coin <= cur_path_->getDropProb()) { decreaseWindow(); } } |