diff --git a/core/tfrpc.js b/core/tfrpc.js index 79dfc2cc..c8cc3058 100644 --- a/core/tfrpc.js +++ b/core/tfrpc.js @@ -48,12 +48,14 @@ function call_rpc(message) { } else if (message.result !== undefined) { if (g_calls[message.id]) { g_calls[message.id].resolve(message.result); + delete g_calls[message.id]; } else { throw new Error(message.id + ' not found to reply.'); } } else if (message.error !== undefined) { if (g_calls[message.id]) { g_calls[message.id].reject(message.error); + delete g_calls[message.id]; } else { throw new Error(message.id + ' not found to reply.'); }