about summary refs log tree commit diff
path: root/src/libstd/rt/uv
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-10-26 16:04:05 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-10-26 16:04:05 -0700
commit651f5db4623526d416458e9f77632e7dd72f96a8 (patch)
tree701656ee731f6e3353ba45e85a6a79886ee31194 /src/libstd/rt/uv
parentdcdcd309fb9baf06f835831c83b94a5ad1cdd568 (diff)
downloadrust-651f5db4623526d416458e9f77632e7dd72f96a8.tar.gz
rust-651f5db4623526d416458e9f77632e7dd72f96a8.zip
Implement another error code found on windows.
Closes #8811
Diffstat (limited to 'src/libstd/rt/uv')
-rw-r--r--src/libstd/rt/uv/mod.rs1
-rw-r--r--src/libstd/rt/uv/uvll.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/rt/uv/mod.rs b/src/libstd/rt/uv/mod.rs
index c92a54425bf..b611c6a5c5d 100644
--- a/src/libstd/rt/uv/mod.rs
+++ b/src/libstd/rt/uv/mod.rs
@@ -314,6 +314,7 @@ pub fn uv_error_to_io_error(uverr: UvError) -> IoError {
             ECONNRESET => ConnectionReset,
             ENOTCONN => NotConnected,
             EPIPE => BrokenPipe,
+            ECONNABORTED => ConnectionAborted,
             err => {
                 rtdebug!("uverr.code {}", err as int);
                 // XXX: Need to map remaining uv error types
diff --git a/src/libstd/rt/uv/uvll.rs b/src/libstd/rt/uv/uvll.rs
index 18e95c8966e..2964eb9c58b 100644
--- a/src/libstd/rt/uv/uvll.rs
+++ b/src/libstd/rt/uv/uvll.rs
@@ -55,6 +55,7 @@ pub mod errors {
     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 {
@@ -66,6 +67,7 @@ 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;