Skip to content

Commit 7e5c146

Browse files
small client fixes
1 parent 4822d81 commit 7e5c146

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

socketio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
from .middleware import WSGIApp, Middleware
1212
from .tornado import get_tornado_handler
1313
if sys.version_info >= (3, 5): # pragma: no cover
14-
# from .asyncio_client import AsyncClient
1514
from .asyncio_client import AsyncClient
1615
from .asyncio_server import AsyncServer
1716
from .asyncio_manager import AsyncManager
1817
from .asyncio_namespace import AsyncNamespace, AsyncClientNamespace
1918
from .asyncio_redis_manager import AsyncRedisManager
2019
from .asgi import ASGIApp
2120
else: # pragma: no cover
21+
AsyncClient = None
2222
AsyncServer = None
2323
AsyncManager = None
2424
AsyncNamespace = None

socketio/asyncio_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414

1515
class AsyncClient(client.Client):
16-
"""An Socket.IO client for asyncio.
16+
"""A Socket.IO client for asyncio.
1717
18-
This class implements a fully compliant Engine.IO web client with support
18+
This class implements a fully compliant Socket.IO web client with support
1919
for websocket and long-polling transports.
2020
2121
:param reconnection: ``True`` if the client should automatically attempt to
@@ -110,6 +110,7 @@ async def wait(self):
110110
"""
111111
while True:
112112
await self.eio.wait()
113+
await self.sleep(1) # give the reconnect task time to start up
113114
if not self._reconnect_task:
114115
break
115116
await self._reconnect_task

socketio/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414

1515
class Client(object):
16-
"""An Socket.IO client.
16+
"""A Socket.IO client.
1717
18-
This class implements a fully compliant Engine.IO web client with support
18+
This class implements a fully compliant Socket.IO web client with support
1919
for websocket and long-polling transports.
2020
2121
:param reconnection: ``True`` if the client should automatically attempt to
@@ -214,6 +214,7 @@ def wait(self):
214214
"""
215215
while True:
216216
self.eio.wait()
217+
self.sleep(1) # give the reconnect task time to start up
217218
if not self._reconnect_task:
218219
break
219220
self._reconnect_task.join()

0 commit comments

Comments
 (0)