You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
websocket: show more debug
This commit is contained in:
@@ -305,7 +305,7 @@ class WebSocketApp:
|
||||
async for msg in ws:
|
||||
import micropython
|
||||
print(f"websocket.py _connect_and_run thread stack used: {micropython.stack_use()}")
|
||||
_log_debug(f"websocket.py _connect_and_run received msg: type={msg.type}, length: {len(msg.data)} and data={str(msg.data)[:70]}...")
|
||||
_log_debug(f"websocket.py _connect_and_run received msg: type={msg.type}, length: {len(msg.data)} and data={str(msg.data)[:120]}...")
|
||||
if not self.running:
|
||||
_log_debug("Not running, breaking message loop")
|
||||
break
|
||||
@@ -331,7 +331,7 @@ class WebSocketApp:
|
||||
|
||||
async def _send_async(self, data, opcode):
|
||||
"""Async send implementation."""
|
||||
_log_debug(f"Sending: opcode={opcode}, data={str(data)[:90]}...")
|
||||
_log_debug(f"Sending: opcode={opcode}, data={str(data)[:700]}")
|
||||
try:
|
||||
if opcode == ABNF.OPCODE_TEXT:
|
||||
await self.ws.send_str(data)
|
||||
|
||||
Reference in New Issue
Block a user