From 571a16fbf04309b9a0d110e8e01bc02543446ce5 Mon Sep 17 00:00:00 2001 From: scretxc <134952525+scretxc@users.noreply.github.com> Date: Wed, 7 Jun 2023 13:01:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8DHeartbeat=E9=87=8D=E7=BD=AEcu?= =?UTF-8?q?rrentResponse=20(#176)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免Heartbeat重置currentResponse --- lua/client/client.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/client/client.lua b/lua/client/client.lua index f6528847..43f0184c 100644 --- a/lua/client/client.lua +++ b/lua/client/client.lua @@ -23,8 +23,10 @@ function Client:initialize() self.client.callback = function(_self, command, jsonData) local cb = fk.client_callback[command] - Fk.currentResponsePattern = nil - Fk.currentResponseReason = nil + if command ~= "Heartbeat" and command ~= "StartChangeSelf" and command ~= "ChangeSelf" then + Fk.currentResponsePattern = nil + Fk.currentResponseReason = nil + end if (type(cb) == "function") then cb(jsonData)