From af6cf274641e3e1b3be942e937f1a19bbc0ac73f Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 12 Mar 2018 15:02:28 +0100 Subject: [PATCH] src: enable `StreamPipe` for generic `StreamBase`s PR-URL: https://github.com/nodejs/quic/pull/150 Reviewed-By: James M Snell --- src/stream_pipe.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/stream_pipe.cc b/src/stream_pipe.cc index 5f7514b1b8..1271698be7 100644 --- a/src/stream_pipe.cc +++ b/src/stream_pipe.cc @@ -69,8 +69,6 @@ void StreamPipe::Unpipe(bool is_in_deletion) { if (pending_writes_ == 0) sink()->RemoveStreamListener(&writable_listener_); - if (is_in_deletion) return; - // Delay the JS-facing part with SetImmediate, because this might be from // inside the garbage collector, so we can’t run JS here. HandleScope handle_scope(env()->isolate()); @@ -176,9 +174,7 @@ void StreamPipe::WritableListener::OnStreamAfterWrite(WriteWrap* w, } if (pipe->is_eof_) { - HandleScope handle_scope(pipe->env()->isolate()); - InternalCallbackScope callback_scope(pipe, - InternalCallbackScope::kSkipTaskQueues); + AsyncScope async_scope(pipe); pipe->sink()->Shutdown(); pipe->Unpipe(); return;