-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
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:
Line 341 in 1cde8c6
| except Exception as exc: |
and also here:
Line 243 in 1cde8c6
| except Exception as exc: |
You'd need to reply to caller (same as on other exceptions) and then re-raise or somehow exit cleanly.
Metadata
Metadata
Assignees
Labels
No labels