Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: does not handle own CancelledError on client.close() #7

Open
Andrei-Pozolotin opened this issue Jan 19, 2020 · 3 comments
Open

Comments

@Andrei-Pozolotin
Copy link

  1. great project, thank you

  2. in v 0.4.5: BUG: does not handle own CancelledError on client.close():

2020-01-19 08:54:02 INFO aiocometd.client:287  close                   Closing client...
2020-01-19 08:54:02 ERRO      asyncio:199  exception_reactor       Exception in callback <bound method TransportBase._connect_done of <aiocometd.transports.websocket.WebSocketTransport object at 0x7f9e62e90fa0>>
handle: <Handle TransportBase._connect_done>
Traceback (most recent call last):
  File "uvloop/cbhandles.pyx", line 70, in uvloop.loop.Handle._run
  File "/usr/lib/python3.8/site-packages/aiocometd/transports/base.py", line 541, in _connect_done
    result: Union[JsonObject, Exception] = future.result()
asyncio.exceptions.CancelledError
2020-01-19 08:54:02 ERRO      asyncio:199  exception_reactor       Exception in callback <bound method WebSocketTransport._receive_done of <aiocometd.transports.websocket.WebSocketTransport object at 0x7f9e62e90fa0>>
handle: <Handle WebSocketTransport._receive_done>
Traceback (most recent call last):
  File "uvloop/cbhandles.pyx", line 70, in uvloop.loop.Handle._run
  File "/usr/lib/python3.8/site-packages/aiocometd/transports/websocket.py", line 261, in _receive_done
    result = future.result()
asyncio.exceptions.CancelledError
2020-01-19 08:54:03 INFO aiocometd.client:298  close                   Client closed.
  1. in aiocometd/transports/base.py:
    https://github.com/robertmrk/aiocometd/blob/0.4.5/aiocometd/transports/base.py#L541

  2. in aiocometd/transports/websocket.py:
    https://github.com/robertmrk/aiocometd/blob/0.4.5/aiocometd/transports/websocket.py#L261

  3. in both cases these are internal tasks, which are both created and canceled by aiocometd,
    and they both propagate own aiocometd initiated CancelledError to the event loop
    exception handler

@Graeme22
Copy link

Same issue here. Is this project still maintained?

@Andrei-Pozolotin
Copy link
Author

Andrei-Pozolotin commented Apr 22, 2022

  1. works in this fork:
    https://github.com/random-python/x_aiocometd
  2. activate with pip via requirements.txt:
### aiocometd == 0.4.5 ### disable
aiocometd @ git+https://github.com/random-python/x_aiocometd@develop ### enalbe ###

@Graeme22
Copy link

Graeme22 commented Apr 22, 2022

  1. works in this fork:
    https://github.com/random-python/x_aiocometd
  2. activate with pip via requirements.txt:
### aiocometd == 0.4.5 ### disable
git+https://github.com/random-python/x_aiocometd@develop ### enalbe ###

This is great! Could you create a release so that if it's used as a dependency it can point to a specific version instead of the develop branch?

Made my own!

brberry added a commit to brberry/aiocometd-ng that referenced this issue Apr 15, 2024
brberry added a commit to brberry/aiocometd-ng that referenced this issue Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants