Skip to content

Commit b08138f

Browse files
Trotttargos
authored andcommitted
stream: fix error-path function call
The `onFinish()` function takes a single argument. The two extra arguments passed here are already in the function scope, and may result in the error being mishandled. PR-URL: #41433 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
1 parent 62aa190 commit b08138f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/streams/writable.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ function callFinal(stream, state) {
711711
}
712712
}
713713
} catch (err) {
714-
onFinish(stream, state, err);
714+
onFinish(err);
715715
}
716716

717717
state.sync = false;

0 commit comments

Comments
 (0)