Skip to content

Commit 8c725a6

Browse files
committed
---
yaml --- r: 141005 b: refs/heads/try2 c: d951da8 h: refs/heads/master i: 141003: 3b1ff36 v: v3
1 parent d44a5b0 commit 8c725a6

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 2bc1e6ba606e3f08a49bbadc556558cb42b7ea32
8+
refs/heads/try2: d951da82768685cacba7444dae10ede2a71efedb
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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/try2/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/try2/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/try2/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)