Skip to content

Commit

Permalink
Change clock granularity(G) to kcp->interval
Browse files Browse the repository at this point in the history
  • Loading branch information
en committed Aug 8, 2017
1 parent 4355493 commit 949b5ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Generated by Cargo
# will have compiled files and executables
/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here http:https://doc.crates.io/guide.html#cargotoml-vs-cargolock
**/*.rs.bk
Cargo.lock
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ authors = ["Yuanchao Sun <[email protected]>"]
[dependencies]
byteorder = "1"
bytes = "0.4"
env_logger = { version = "0.3", default-features = false }
env_logger = { version = "0.4", default-features = false }
futures = "0.1"
iovec = "0.1.0"
mio = "0.6"
rand = "0.3"
time = "0.1"
tokio-core = "^0.1.9"
tokio-core = "0.1.9"
tokio-io = "0.1"
2 changes: 1 addition & 1 deletion src/kcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ impl<W: Write> KCP<W> {
self.rx_srtt = 1;
}
}
let rto = self.rx_srtt + cmp::max(1, 4 * self.rx_rttval);
let rto = self.rx_srtt + cmp::max(self.interval, 4 * self.rx_rttval);
self.rx_rto = bound(self.rx_minrto, rto, KCP_RTO_MAX);
}

Expand Down

0 comments on commit 949b5ac

Please sign in to comment.