From fb32a7d600154f209216b8fa4f78fd75ff870c49 Mon Sep 17 00:00:00 2001 From: bott Date: Tue, 28 Aug 2018 10:38:45 +0200 Subject: [PATCH] fix python websocket client no await --- websocket-tcp-chat/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websocket-tcp-chat/client.py b/websocket-tcp-chat/client.py index 8a1bd9ae..4de91784 100755 --- a/websocket-tcp-chat/client.py +++ b/websocket-tcp-chat/client.py @@ -33,7 +33,7 @@ def start_client(loop, url): elif msg.type == aiohttp.WSMsgType.BINARY: print('Binary: ', msg.data) elif msg.type == aiohttp.WSMsgType.PING: - ws.pong() + yield from ws.pong() elif msg.type == aiohttp.WSMsgType.PONG: print('Pong received') else: