规避push有时json报错的问题

修复心跳包帧头错误
This commit is contained in:
murmur 2023-03-23 09:28:23 +08:00
parent 9d9cf6f768
commit 6367751b7a

View File

@ -51,7 +51,11 @@ _{datetime.datetime.now()}_
{content}""",
"token": "tt"
})
try:
res = res.json()
except:
return
else:
if res["success"]:
return None
else:
@ -173,6 +177,7 @@ def tt_hh(addr, data):
update_pairs(addr, ccid)
# 组帧再返回
msg = bytearray(data[:])
msg[:5] = b"$TTMX"
val = "%04x" % int(time.time())
tmp=[]
for i in range(0,len(val),2):