mirror of
https://github.com/actix/examples
synced 2024-11-23 22:41:07 +01:00
fix python websocket client no await
This commit is contained in:
parent
58d3e5f8c5
commit
fb32a7d600
@ -33,7 +33,7 @@ def start_client(loop, url):
|
|||||||
elif msg.type == aiohttp.WSMsgType.BINARY:
|
elif msg.type == aiohttp.WSMsgType.BINARY:
|
||||||
print('Binary: ', msg.data)
|
print('Binary: ', msg.data)
|
||||||
elif msg.type == aiohttp.WSMsgType.PING:
|
elif msg.type == aiohttp.WSMsgType.PING:
|
||||||
ws.pong()
|
yield from ws.pong()
|
||||||
elif msg.type == aiohttp.WSMsgType.PONG:
|
elif msg.type == aiohttp.WSMsgType.PONG:
|
||||||
print('Pong received')
|
print('Pong received')
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user