diff --git a/examples/client/asyncio/latency_client.py b/examples/client/asyncio/latency_client.py index b977a3f..79d8f8f 100644 --- a/examples/client/asyncio/latency_client.py +++ b/examples/client/asyncio/latency_client.py @@ -20,7 +20,7 @@ async def connect(): @sio.event -async def pong_from_server(data): +async def pong_from_server(): global start_timer latency = time.time() - start_timer print('latency is {0:.2f} ms'.format(latency * 1000)) diff --git a/examples/client/threads/latency_client.py b/examples/client/threads/latency_client.py index a934e48..d0a1cf2 100644 --- a/examples/client/threads/latency_client.py +++ b/examples/client/threads/latency_client.py @@ -1,7 +1,7 @@ import time import socketio -sio = socketio.Client() +sio = socketio.Client(engineio_logger=True) start_timer = None @@ -18,7 +18,7 @@ def connect(): @sio.event -def pong_from_server(data): +def pong_from_server(): global start_timer latency = time.time() - start_timer print('latency is {0:.2f} ms'.format(latency * 1000))