fix(stor): ensure stream is destroyed once used up

This commit is contained in:
Tyler Stewart
2017-06-08 17:23:14 -06:00
parent 4d8a69615c
commit 51a6448ac2

View File

@@ -26,7 +26,8 @@ module.exports = {
dataSocket.on('data', data => stream.write(data, this.encoding));
this.reply(150).then(() => dataSocket.resume());
});
})
.finally(() => when.try(stream.destroy.bind(stream)));
})
.catch(when.TimeoutError, err => {
log.error(err);