doc: adjust code sample for stream.finished

PR-URL: https://github.com/nodejs/node/pull/29983
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
Cotton Hou
2019-10-15 22:21:46 +08:00
committed by Michaël Zasso
parent 3a90fcfb79
commit f185990738

View File

@@ -1534,7 +1534,7 @@ If this is unwanted behavior then the returned cleanup function needs to be
invoked in the callback:
```js
const cleanup = finished(...streams, (err) => {
const cleanup = finished(rs, (err) => {
cleanup();
// ...
});