about summary refs log tree commit diff
path: root/src/libnative/io
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-09-02 08:21:51 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-09-02 08:21:51 -0700
commit2ec7bb8756a449ce4c99c0ac829be9c79c1c3992 (patch)
treed1894c7b8da95702cc9278954c3d873bf68f47f6 /src/libnative/io
parent5dfb7a6ec1c1b7827a1f019b276c4d959cf2d71e (diff)
downloadrust-2ec7bb8756a449ce4c99c0ac829be9c79c1c3992.tar.gz
rust-2ec7bb8756a449ce4c99c0ac829be9c79c1c3992.zip
native: Remove a bogus assert in net::read
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.
Diffstat (limited to 'src/libnative/io')
-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 368b5914444..55687c96439 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 }
             }