mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-22 22:27:17 +00:00
fix: [sync client] fix websockets client connect for python >= 3.8
This commit is contained in:
parent
e075794fd0
commit
d4cf2a7cf9
1 changed files with 2 additions and 3 deletions
|
@ -54,13 +54,12 @@ async def pull(websocket, ail_uuid):
|
||||||
sys.stdout.write(obj)
|
sys.stdout.write(obj)
|
||||||
|
|
||||||
async def push(websocket, ail_uuid):
|
async def push(websocket, ail_uuid):
|
||||||
## DEBUG:
|
# ## DEBUG:
|
||||||
# try:
|
# try:
|
||||||
# while True:
|
# while True:
|
||||||
# await websocket.send('test')
|
# await websocket.send('test')
|
||||||
# await asyncio.sleep(10)
|
# await asyncio.sleep(10)
|
||||||
# except websockets.exceptions.ConnectionClosedError as err:
|
# except websockets.exceptions.ConnectionClosedError as err:
|
||||||
# print(err.code)
|
|
||||||
# raise err
|
# raise err
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -110,7 +109,7 @@ async def ail_to_ail_client(ail_uuid, sync_mode, api, ail_key=None, client_id=No
|
||||||
client_id = ail_2_ail.create_sync_client_cache(ail_uuid, sync_mode)
|
client_id = ail_2_ail.create_sync_client_cache(ail_uuid, sync_mode)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async with websockets.client.connect(
|
async with websockets.connect(
|
||||||
uri,
|
uri,
|
||||||
ssl=ssl_context,
|
ssl=ssl_context,
|
||||||
#open_timeout=10, websockers 10.0 /!\ python>=3.7
|
#open_timeout=10, websockers 10.0 /!\ python>=3.7
|
||||||
|
|
Loading…
Reference in a new issue