Skip to content

Commit 8ea2154

Browse files
committed
fs: avoid redundant FileHandle stream close listener
1 parent 59c7463 commit 8ea2154

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

lib/internal/fs/streams.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ function importFd(stream, options) {
159159
stream[kHandleCloseListenerCleanup] = FunctionPrototypeBind(
160160
cleanupHandleCloseListener, stream);
161161
options.fd.once('close', stream[kHandleCloseListener]);
162-
stream.once('close', stream[kHandleCloseListenerCleanup]);
163162
stream.once('end', stream[kHandleCloseListenerCleanup]);
164163
stream.once('finish', stream[kHandleCloseListenerCleanup]);
165164
stream.once('error', stream[kHandleCloseListenerCleanup]);
@@ -178,7 +177,6 @@ function cleanupHandleCloseListener() {
178177

179178
this[kHandle].removeListener('close', this[kHandleCloseListener]);
180179
this[kHandle][kUnref]();
181-
this.removeListener('close', this[kHandleCloseListenerCleanup]);
182180
this.removeListener('end', this[kHandleCloseListenerCleanup]);
183181
this.removeListener('finish', this[kHandleCloseListenerCleanup]);
184182
this.removeListener('error', this[kHandleCloseListenerCleanup]);

0 commit comments

Comments
 (0)