1
0
mirror of https://github.com/actix/examples synced 2024-11-27 16:02:57 +01:00

fix python websocket client no await

This commit is contained in:
bott 2018-08-28 10:38:45 +02:00
parent 58d3e5f8c5
commit fb32a7d600

View File

@ -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: