From d2d1ab0a0d92562cea807034530394f1cc61ea8f Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Sun, 12 Feb 2017 12:03:25 -0800 Subject: [PATCH] Silently ignore unrecognized TransferComplete --- lib/session.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/session.coffee b/lib/session.coffee index 4785101..6769e50 100644 --- a/lib/session.coffee +++ b/lib/session.coffee @@ -162,9 +162,11 @@ inform = (sessionData, rpcReq, callback) -> transferComplete = (sessionData, rpcReq, callback) -> commandKey = rpcReq.commandKey operation = sessionData.operations[commandKey] + if not operation? - # TODO Show a warning instead - throw new Error('Invalid command key') + # TODO Show a warning + return callback(null, {type : 'TransferCompleteResponse'}) + instance = operation.args.instance delete sessionData.operations[commandKey]