Skip to content

Commit

Permalink
src: enable StreamPipe for generic StreamBases
Browse files Browse the repository at this point in the history
PR-URL: nodejs#150
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
addaleax authored and juanarbol committed Dec 17, 2019
1 parent f821077 commit af6cf27
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/stream_pipe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit af6cf27

Please sign in to comment.