about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-09-07 23:01:34 +0000
committerbors <bors@rust-lang.org>2014-09-07 23:01:34 +0000
commitaaf141d399097d0ea84288b9ad1dc842a6158a5c (patch)
tree11b71ddf3893b8aec7c3047485cf7adfb07c1335
parent19dc574890c42a4e87665276d4cff1f69ca13e21 (diff)
parent2ec7bb8756a449ce4c99c0ac829be9c79c1c3992 (diff)
downloadrust-aaf141d399097d0ea84288b9ad1dc842a6158a5c.tar.gz
rust-aaf141d399097d0ea84288b9ad1dc842a6158a5c.zip
auto merge of #16942 : alexcrichton/rust/remove-net-assert, r=brson
This assert was likely inherited from some point, but it's not quite valid as a
no-timeout read may enter this loop, but data could be stolen by any other read
after the socket is deemed readable.

I saw this fail in a recent bors run where the assertion was tripped.
-rw-r--r--src/libnative/io/net.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libnative/io/net.rs b/src/libnative/io/net.rs
index cbfc673e6af..1a7a8da391a 100644
--- a/src/libnative/io/net.rs
+++ b/src/libnative/io/net.rs
@@ -959,7 +959,7 @@ pub fn read<T>(fd: sock_t,
             // wait for the socket to become readable again.
             let _guard = lock();
             match retry(|| read(deadline.is_some())) {
-                -1 if util::wouldblock() => { assert!(deadline.is_some()); }
+                -1 if util::wouldblock() => {}
                 -1 => return Err(os::last_error()),
                n => { ret = n; break }
             }