diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-03-25 01:12:22 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-05-10 15:15:18 +0300 |
commit | 2b3150466e5f4db841f5980cda32172555bdda15 (patch) | |
tree | fd68fdd08feb9681f5ab05d5716f484acb9d796a /src/stream_wrap.h | |
parent | 5d7045960628084f79f5da74272000b7d0b8256f (diff) |
src: always call ReadStop() before Close()
For libuv-backed streams, always explicitly stop reading before
closing the handle.
PR-URL: https://github.com/nodejs/node/pull/19377
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/stream_wrap.h')
-rw-r--r-- | src/stream_wrap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stream_wrap.h b/src/stream_wrap.h index 7847ebe7546..94a161b6d54 100644 --- a/src/stream_wrap.h +++ b/src/stream_wrap.h @@ -76,6 +76,8 @@ class LibuvStreamWrap : public HandleWrap, public StreamBase { ShutdownWrap* CreateShutdownWrap(v8::Local<v8::Object> object) override; WriteWrap* CreateWriteWrap(v8::Local<v8::Object> object) override; + void Close(v8::Local<v8::Value> close_callback) override; + protected: LibuvStreamWrap(Environment* env, v8::Local<v8::Object> object, |