mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
b1fc7745f2
Changed the logic in fs.ReadStream and fs.WriteStream so that close always calls the prototype method rather than the internal event listener. Fixes: https://github.com/nodejs/node/issues/2950 PR-URL: https://github.com/nodejs/node/pull/11225 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
12 lines
207 B
JavaScript
12 lines
207 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const fs = require('fs');
|
|
|
|
const s = fs.createReadStream(__filename);
|
|
|
|
s.close(common.mustCall(noop));
|
|
s.close(common.mustCall(noop));
|
|
|
|
function noop() {}
|