添加cache为空的判断

This commit is contained in:
murmur 2023-03-14 22:13:41 +08:00
parent f9ae012dbf
commit 42b86fe6fe

View File

@ -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)