Skip to content

Commit 59326f3

Browse files
committed
---
yaml --- r: 61371 b: refs/heads/try c: d951da8 h: refs/heads/master i: 61369: dd4e3f6 61367: ee05b03 v: v3
1 parent b58d3aa commit 59326f3

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2d28d645422c1617be58c8ca7ad9a457264ca850
5-
refs/heads/try: 2bc1e6ba606e3f08a49bbadc556558cb42b7ea32
5+
refs/heads/try: d951da82768685cacba7444dae10ede2a71efedb
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libcore/rt/io/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ pub enum IoErrorKind {
348348
ConnectionFailed,
349349
Closed,
350350
ConnectionRefused,
351-
ConnectionReset
351+
ConnectionReset,
352+
BrokenPipe
352353
}
353354

354355
// XXX: Can't put doc comments on macros

branches/try/src/libcore/rt/io/net/tcp.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ mod test {
233233
loop {
234234
let mut stop = false;
235235
do io_error::cond.trap(|e| {
236-
assert!(e.kind == ConnectionReset);
236+
// NB: ECONNRESET on linux, EPIPE on mac
237+
assert!(e.kind == ConnectionReset || e.kind == BrokenPipe);
237238
stop = true;
238239
}).in {
239240
stream.write(buf);

branches/try/src/libcore/rt/uv/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,9 @@ pub fn uv_error_to_io_error(uverr: UvError) -> IoError {
272272
EACCES => PermissionDenied,
273273
ECONNREFUSED => ConnectionRefused,
274274
ECONNRESET => ConnectionReset,
275-
_ => {
275+
EPIPE => BrokenPipe,
276+
e => {
277+
rtdebug!("e %u", e as uint);
276278
// XXX: Need to map remaining uv error types
277279
OtherIoError
278280
}

branches/try/src/libcore/rt/uv/uvll.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ pub static EADDRINFO: c_int = 2;
4040
pub static EACCES: c_int = 3;
4141
pub static ECONNREFUSED: c_int = 12;
4242
pub static ECONNRESET: c_int = 13;
43+
pub static EPIPE: c_int = 36;
4344

4445
pub struct uv_err_t {
4546
code: c_int,

0 commit comments

Comments
 (0)