Commit 383bcef
committed
Catching asyncio.CancelledError instead of KeyboardInterrupt and EOFError. Asyncio will catch these errors outside of the task and raise the CancelledError to cancel the task. This makes sure that the websocket client is properly disconnected if the user press control-C or control-D.
1 parent d7dafcc commit 383bcef
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
0 commit comments