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.
// 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 }
}