添加cache为空的判断
This commit is contained in:
parent
f9ae012dbf
commit
42b86fe6fe
@ -121,7 +121,7 @@ def tt_hh(addr, data):
|
|||||||
|
|
||||||
# 从缓存中匹配到数据才重发
|
# 从缓存中匹配到数据才重发
|
||||||
# 仅有新终端上线时才重发
|
# 仅有新终端上线时才重发
|
||||||
if ccid in cache:
|
if cache and ccid in cache:
|
||||||
msgs = cache[ccid][:] # 浅拷贝
|
msgs = cache[ccid][:] # 浅拷贝
|
||||||
sccid = msgs[0][7 + offs : 11 + offs]
|
sccid = msgs[0][7 + offs : 11 + offs]
|
||||||
print("有", len(msgs), "包缓存数据待发。", sccid, "-->", ccid)
|
print("有", len(msgs), "包缓存数据待发。", sccid, "-->", ccid)
|
||||||
|
Loading…
Reference in New Issue
Block a user