From 42b86fe6fe3fee186ee4ed78d15f62d5c3bd59ea Mon Sep 17 00:00:00 2001 From: murmur Date: Tue, 14 Mar 2023 22:13:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0cache=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index 70f84d1..a03bb13 100755 --- a/server.py +++ b/server.py @@ -121,7 +121,7 @@ def tt_hh(addr, data): # 从缓存中匹配到数据才重发 # 仅有新终端上线时才重发 - if ccid in cache: + if cache and ccid in cache: msgs = cache[ccid][:] # 浅拷贝 sccid = msgs[0][7 + offs : 11 + offs] print("有", len(msgs), "包缓存数据待发。", sccid, "-->", ccid)