asyncio.CancelledError should be caught in "try_log"
- Lenguaje dominante
- Python
- Estrellas
- 431
- Forks
- 57
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
~~If `aiozmp` RPC server is terminated with `KeyboardInterrupt` (e.g. ctrl+c), there is inexplicable mess of `asyncio.CancelledError` being logged for every pending remote request - instead of replying back to the caller with a serialized exception, like it is the case for any other exception being raised (and then exiting cleanly). This happens because you only catch `Exception`, but `KeyboardInterrupt` does not inherit from it.~~
~~`KeyboardInterrupt` should be caught here, in addition to `Exception`:~~
https://github.com/aio-libs/aiozmq/blob/1cde8c6831d63e6a778390ce1ce422d6d27f2ab8/aiozmq/rpc/rpc.py#L341
~~and also here:~~
https://github.com/aio-libs/aiozmq/blob/1cde8c6831d63e6a778390ce1ce422d6d27f2ab8/aiozmq/rpc/base.py#L243
~~You'd need to reply to caller (same as on other exceptions) and then re-raise or somehow exit cleanly.~~
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.