aio-libs / aio-libs/aiozmq

asyncio.CancelledError should be caught in "try_log"

Abierto
#174 1 comentario 0 reacciones 0 asignados Ver en GitHub
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

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.