commit | 1f6c2b49cfeef129d6aad03cd8ec7e4e91374de4 | [log] [tgz] |
---|---|---|
author | Carl Lerche <me@carllerche.com> | Fri Aug 30 21:32:02 2019 -0700 |
committer | Carl Lerche <me@carllerche.com> | Fri Aug 30 21:32:02 2019 -0700 |
tree | fe56c66798b6b49597a609ad670db71cd31c7993 | |
parent | 759c6de7622ab0252c425968188900c9c5923b64 [diff] |
fix
diff --git a/src/sys/unix/net.rs b/src/sys/unix/net.rs index 93b4c7e..ce4479d 100644 --- a/src/sys/unix/net.rs +++ b/src/sys/unix/net.rs
@@ -55,7 +55,9 @@ } } -#[cfg(debug_assertions)] +/// Returns `true` if the socket is non-blocking. +/// +/// Used in assertions. pub fn is_non_blocking(socket: RawFd) -> io::Result<bool> { let flags = syscall!(fcntl(socket, libc::F_GETFL, libc::O_NONBLOCK))?; Ok(flags & libc::O_NONBLOCK == libc::O_NONBLOCK)