File tree Expand file tree Collapse file tree 5 files changed +9
-4
lines changed
branches/try2/src/libcore/rt Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: 2bc1e6ba606e3f08a49bbadc556558cb42b7ea32
8
+ refs/heads/try2: d951da82768685cacba7444dae10ede2a71efedb
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -348,7 +348,8 @@ pub enum IoErrorKind {
348
348
ConnectionFailed ,
349
349
Closed ,
350
350
ConnectionRefused ,
351
- ConnectionReset
351
+ ConnectionReset ,
352
+ BrokenPipe
352
353
}
353
354
354
355
// XXX: Can't put doc comments on macros
Original file line number Diff line number Diff line change @@ -233,7 +233,8 @@ mod test {
233
233
loop {
234
234
let mut stop = false ;
235
235
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 ) ;
237
238
stop = true ;
238
239
} ) . in {
239
240
stream. write ( buf) ;
Original file line number Diff line number Diff line change @@ -272,7 +272,9 @@ pub fn uv_error_to_io_error(uverr: UvError) -> IoError {
272
272
EACCES => PermissionDenied,
273
273
ECONNREFUSED => ConnectionRefused,
274
274
ECONNRESET => ConnectionReset,
275
- _ => {
275
+ EPIPE => BrokenPipe,
276
+ e => {
277
+ rtdebug!(" e %u", e as uint);
276
278
// XXX: Need to map remaining uv error types
277
279
OtherIoError
278
280
}
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ pub static EADDRINFO: c_int = 2;
40
40
pub static EACCES : c_int = 3 ;
41
41
pub static ECONNREFUSED : c_int = 12 ;
42
42
pub static ECONNRESET : c_int = 13 ;
43
+ pub static EPIPE : c_int = 36 ;
43
44
44
45
pub struct uv_err_t {
45
46
code : c_int ,
You can’t perform that action at this time.
0 commit comments