Closed,
ConnectionRefused,
ConnectionReset,
+ ConnectionAborted,
NotConnected,
BrokenPipe,
PathAlreadyExists,
MismatchedFileTypeForOperation => ~"MismatchedFileTypeForOperation",
IoUnavailable => ~"IoUnavailable",
ResourceUnavailable => ~"ResourceUnavailable",
+ ConnectionAborted => ~"ConnectionAborted",
}
}
}
}
#[test]
- #[ignore(cfg(windows))] // FIXME #8811
fn write_close_ip4() {
do run_in_mt_newsched_task {
let addr = next_test_ip4();
loop {
let mut stop = false;
do io_error::cond.trap(|e| {
- // NB: ECONNRESET on linux, EPIPE on mac
- assert!(e.kind == ConnectionReset || e.kind == BrokenPipe);
+ // NB: ECONNRESET on linux, EPIPE on mac, ECONNABORTED
+ // on windows
+ assert!(e.kind == ConnectionReset ||
+ e.kind == BrokenPipe ||
+ e.kind == ConnectionAborted);
stop = true;
}).inside {
stream.write(buf);
}
#[test]
- #[ignore(cfg(windows))] // FIXME #8811
fn write_close_ip6() {
do run_in_mt_newsched_task {
let addr = next_test_ip6();
loop {
let mut stop = false;
do io_error::cond.trap(|e| {
- // NB: ECONNRESET on linux, EPIPE on mac
- assert!(e.kind == ConnectionReset || e.kind == BrokenPipe);
+ // NB: ECONNRESET on linux, EPIPE on mac, ECONNABORTED
+ // on windows
+ assert!(e.kind == ConnectionReset ||
+ e.kind == BrokenPipe ||
+ e.kind == ConnectionAborted);
stop = true;
}).inside {
stream.write(buf);
ECONNRESET => ConnectionReset,
ENOTCONN => NotConnected,
EPIPE => BrokenPipe,
+ ECONNABORTED => ConnectionAborted,
err => {
rtdebug!("uverr.code {}", err as int);
// XXX: Need to map remaining uv error types
pub static ECONNRESET: c_int = -4078;
pub static ENOTCONN: c_int = -4054;
pub static EPIPE: c_int = -4048;
+ pub static ECONNABORTED: c_int = -4080;
}
#[cfg(not(windows))]
pub mod errors {
pub static ECONNRESET: c_int = -libc::ECONNRESET;
pub static ENOTCONN: c_int = -libc::ENOTCONN;
pub static EPIPE: c_int = -libc::EPIPE;
+ pub static ECONNABORTED: c_int = -libc::ECONNABORTED;
}
pub static PROCESS_SETUID: c_int = 1 << 0;