git.graph-it.com
/
graphit
/
controlpi-wsserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90e6133
)
Catch CancelledError for connections.
author
Benjamin Braatz
<bb@bbraatz.eu>
Thu, 29 Jul 2021 22:17:31 +0000
(
00:17
+0200)
committer
Benjamin Braatz
<bb@bbraatz.eu>
Thu, 29 Jul 2021 22:17:31 +0000
(
00:17
+0200)
controlpi_plugins/wsserver.py
patch
|
blob
|
history
diff --git
a/controlpi_plugins/wsserver.py
b/controlpi_plugins/wsserver.py
index 7d38a084e96df1dd2e895b85c65c32585d547f8f..981f7e2128a2605b071ac32580d6bee460cd544c 100644
(file)
--- a/
controlpi_plugins/wsserver.py
+++ b/
controlpi_plugins/wsserver.py
@@
-126,7
+126,10
@@
class WSServer(BasePlugin):
async def _handler(self, websocket: WebSocketServerProtocol,
path: str) -> None:
connection = Connection(self.bus, websocket)
- await connection.run()
+ try:
+ await connection.run()
+ except asyncio.CancelledError:
+ pass
async def _process_request(self, path: str,
request_headers: Headers) -> Response: