- Version: v5.10.0 (also seen on 4.3.0)
- Platform: Darwin Kernel Version 14.5.0
- Subsystem: zlib
Zlib references a null object on close after an error:
var zlib = require('zlib');
var inflate = zlib.createInflateRaw(15);
inflate.on('error', function(e) { });
inflate.write('something invalid');
setTimeout(function(){
inflate.close();
}, 100);
Output:
$ node inflate-close.js
zlib.js:465
this._handle.close();
^
TypeError: Cannot read property 'close' of null
at InflateRaw.Zlib.close (zlib.js:465:15)
at null._onTimeout (/tmp/inflate-close.js:8:13)
at Timer.listOnTimeout (timers.js:92:15)
See websockets/ws#664