Closed
Description
This example:
async fn connect() {
loop {
match async_std::os::unix::net::UnixStream::connect("./non-existent").await {
Ok(_) => unreachable!(),
Err(e) if e.kind() == std::io::ErrorKind::NotFound => {}
Err(e) => panic!("Unexpected error: {}", e),
}
}
}
fn main() {
async_std::task::block_on(connect());
}
Crashes with thread 'main' panicked at 'Unexpected error: Too many open files (os error 24)', examples/test-connect.rs:6:23
while it shouldn't and didn't crash in 1.6.3. The crash means file descriptors are leaking (maybe because of a memory leak, but I didn't investigate further).
This file descriptor leak is still there in 1.6.5 and master as of f09fa42.
Metadata
Metadata
Assignees
Labels
No labels