Skip to content

Commit af6cf27

Browse files
addaleaxjuanarbol
authored andcommitted
src: enable StreamPipe for generic StreamBases
PR-URL: nodejs#150 Reviewed-By: James M Snell <[email protected]>
1 parent f821077 commit af6cf27

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/stream_pipe.cc

+1-5
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ void StreamPipe::Unpipe(bool is_in_deletion) {
6969
if (pending_writes_ == 0)
7070
sink()->RemoveStreamListener(&writable_listener_);
7171

72-
if (is_in_deletion) return;
73-
7472
// Delay the JS-facing part with SetImmediate, because this might be from
7573
// inside the garbage collector, so we can’t run JS here.
7674
HandleScope handle_scope(env()->isolate());
@@ -176,9 +174,7 @@ void StreamPipe::WritableListener::OnStreamAfterWrite(WriteWrap* w,
176174
}
177175

178176
if (pipe->is_eof_) {
179-
HandleScope handle_scope(pipe->env()->isolate());
180-
InternalCallbackScope callback_scope(pipe,
181-
InternalCallbackScope::kSkipTaskQueues);
177+
AsyncScope async_scope(pipe);
182178
pipe->sink()->Shutdown();
183179
pipe->Unpipe();
184180
return;

0 commit comments

Comments
 (0)