diff options
author | Fedor Indutny <fedor@indutny.com> | 2015-03-05 11:04:00 -0500 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2015-03-05 13:38:22 -0500 |
commit | 3446ff417ba1e11d35d1661b8788eac5af029360 (patch) | |
tree | 9e48f3d4ddecc8a0e243406c6b826a10b7611626 /src/stream_base-inl.h | |
parent | 9d2b89d06c14f8e250e290668507c9daa8ec97ca (diff) | |
download | node-new-3446ff417ba1e11d35d1661b8788eac5af029360.tar.gz |
tty: do not add `shutdown` method to handle
UV_TTY does not support `uv_shutdown()` so adding this method in
StreamBase will cause an `abort()` in C land.
Fix: https://github.com/iojs/io.js/issues/1068
PR-URL: https://github.com/iojs/io.js/pull/1073
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/stream_base-inl.h')
-rw-r--r-- | src/stream_base-inl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h index 490909456b..46d9f78905 100644 --- a/src/stream_base-inl.h +++ b/src/stream_base-inl.h @@ -37,7 +37,8 @@ void StreamBase::AddMethods(Environment* env, env->SetProtoMethod(t, "readStart", JSMethod<Base, &StreamBase::ReadStart>); env->SetProtoMethod(t, "readStop", JSMethod<Base, &StreamBase::ReadStop>); - env->SetProtoMethod(t, "shutdown", JSMethod<Base, &StreamBase::Shutdown>); + if ((flags & kFlagNoShutdown) == 0) + env->SetProtoMethod(t, "shutdown", JSMethod<Base, &StreamBase::Shutdown>); if ((flags & kFlagHasWritev) != 0) env->SetProtoMethod(t, "writev", JSMethod<Base, &StreamBase::Writev>); env->SetProtoMethod(t, |