summaryrefslogtreecommitdiff
path: root/src/stream_wrap.h
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-03-24 23:12:22 +0100
committerAnna Henningsen <anna@addaleax.net>2018-05-10 14:15:18 +0200
commit2b3150466e5f4db841f5980cda32172555bdda15 (patch)
treefd68fdd08feb9681f5ab05d5716f484acb9d796a /src/stream_wrap.h
parent5d7045960628084f79f5da74272000b7d0b8256f (diff)
downloadandroid-node-v8-2b3150466e5f4db841f5980cda32172555bdda15.tar.gz
android-node-v8-2b3150466e5f4db841f5980cda32172555bdda15.tar.bz2
android-node-v8-2b3150466e5f4db841f5980cda32172555bdda15.zip
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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stream_wrap.h b/src/stream_wrap.h
index 7847ebe754..94a161b6d5 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,