From 55c4e220faa1b291897418495066afd7bc93b3c0 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Fri, 19 Dec 2014 16:28:42 +0000 Subject: [PATCH] prevent double callback in getFileStream --- services/filestore/app/coffee/S3PersistorManager.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/services/filestore/app/coffee/S3PersistorManager.coffee b/services/filestore/app/coffee/S3PersistorManager.coffee index a6e8d18243..ef1824491e 100644 --- a/services/filestore/app/coffee/S3PersistorManager.coffee +++ b/services/filestore/app/coffee/S3PersistorManager.coffee @@ -59,6 +59,7 @@ module.exports = @sendFile bucketName, key, fsPath, callback getFileStream: (bucketName, key, callback = (err, res)->)-> + callback = _.once callback logger.log bucketName:bucketName, key:key, "getting file from s3" s3Client = knox.createClient key: settings.filestore.s3.key