A robust ClamAV virus scanning library supporting scanning files, directories, and streams with local sockets, local/remote TCP, and local clamscan/clamdscan binaries (with failover).
If an incoming stream is empty, the underlying Transform stream will call flush() without having called transform(). This results in the following error:
TypeError: uncaughtException: Cannot read property 'writable' of undefined
at Transform.flush [as _flush] (/usr/src/app/node_modules/clamscan/index.js:1037:41)
at Transform.prefinish (_stream_transform.js:141:10)
at Transform.emit (events.js:198:13)
at Transform.EventEmitter.emit (domain.js:466:23)
at prefinish (_stream_writable.js:635:14)
at finishMaybe (_stream_writable.js:643:5)
at endWritable (_stream_writable.js:663:3)
at Transform.Writable.end (_stream_writable.js:594:5)
at FileStream.onend (_stream_readable.js:671:10)
at Object.onceWrapper (events.js:286:20)
at FileStream.emit (events.js:203:15)
at FileStream.EventEmitter.emit (domain.js:466:23)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
If an incoming stream is empty, the underlying
Transform
stream will callflush()
without having calledtransform()
. This results in the following error: