asyncins / aiowebsocket

Async WebSocket Client. Advantage: Flexible Lighter and Faster
321 stars 55 forks source link

ping check expired #7

Open sherkwast opened 5 years ago

sherkwast commented 5 years ago

错误信息:每当出现下面这条消息后, 2019-11-12 10:17:21-Client receive: b'\x03\xebping check expired, session: 5f9d157d-15ec-4b6a-b30d-681daaa06dd7' 就会抛出错误

Traceback (most recent call last):
  File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-9-9a06e2fb4ad2>", line 26, in <module>
    asyncio.get_event_loop().run_until_complete(startup(remote))
  File "/usr/local/Caskroom/miniconda/base/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "<ipython-input-9-9a06e2fb4ad2>", line 14, in startup
    mes = await converse.receive()
  File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/aiowebsocket/converses.py", line 103, in receive
    single_message = await self.frame.read(text, mask)
  File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/aiowebsocket/freams.py", line 238, in read
    fin, code, rsv1, rsv2, rsv3, message = await self.unpack_frame(mask, maxsize)
  File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/aiowebsocket/freams.py", line 209, in unpack_frame
    frame_header = await reader(2)
  File "/usr/local/Caskroom/miniconda/base/lib/python3.7/asyncio/streams.py", line 677, in readexactly
    raise IncompleteReadError(incomplete, n)
asyncio.streams.IncompleteReadError: 0 bytes read on a total of 2 expected bytes

不知aiowebsocket的心跳响应是如何运作的,有没有内置的解决方法?或者是否支持自定义处理?