rust-utp icon indicating copy to clipboard operation
rust-utp copied to clipboard

add read timeout

Open vinipsmaker opened this issue 9 years ago • 4 comments

This commit adds a set_read_timeout function similar to Rust's set_read_timeout[1]. The differences compared to upstream are:

  • Operation always succeed.
  • It takes an i64 instead Duration.

[1] https://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_read_timeout

vinipsmaker avatar Aug 07 '15 19:08 vinipsmaker

PR updated/rebased

vinipsmaker avatar Oct 14 '15 12:10 vinipsmaker

PR updated.

It's a lot more stable now.

vinipsmaker avatar Dec 28 '15 10:12 vinipsmaker

On our usage of rust-utp, a stress test to study rust-utp was used and the failure rate was around 50%. With the new set-read-timeout, failure rate went to 0% (we already executed the test plenty of time and still no sign of failure). It's definitively more stable now.

vinipsmaker avatar Dec 28 '15 21:12 vinipsmaker

We're still executing tests to find more problems within rust-utp and we found a few:

  • https://github.com/inetic/rust-utp/commit/1a578c6f70afc286faa1fe507a0cbdb08db2c76e
  • https://github.com/inetic/rust-utp/commit/66e5b716a8c9d19ee54c56873bc451ff78088c73
  • https://github.com/inetic/rust-utp/commit/a7b30f0ef2d1cd6a82e43ad463750e86e1ddb6a6
  • https://github.com/meqif/rust-utp/pull/24

All of them touches different parts of the code and show problems that are unrelated to this PR. I'd appreciate any input on this, as it's becoming a burden to maintain separate sets of patchsets. Merging just this one PR would already make things a tad easier, as it'd allow me to maintain the same set of changes to our code and to the upstream rust-utp, as this PR introduces a fundamental change in code.

vinipsmaker avatar Jan 07 '16 06:01 vinipsmaker