From af3e96c7e8da43e9b24ccef889f25914d26e289e Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 19 Jun 2022 21:09:22 +0000 Subject: [PATCH] Cleanup this state, maybe. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3910 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- core/tfrpc.js | 2 ++ 1 file changed, 2 insertions(+) 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.'); }