mirror of https://github.com/nodejs/node.git
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: https://github.com/nodejs/node/pull/41433 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
This commit is contained in:
parent
c4194c0dce
commit
8c3637cd35
|
@ -712,7 +712,7 @@ function callFinal(stream, state) {
|
|||
}
|
||||
}
|
||||
} catch (err) {
|
||||
onFinish(stream, state, err);
|
||||
onFinish(err);
|
||||
}
|
||||
|
||||
state.sync = false;
|
||||
|
|
Loading…
Reference in New Issue