Commit ae1739f
guac fix (kevoreilly#2903)
* guac fix
```
✦ I have resolved the reported issues in the Guacamole web interface integration.
1. Fixed `guac-web.service` startup error: Updated web/web/asgi.py to explicitly register the http handler in ProtocolTypeRouter, complying with Channels 4.x requirements.
2. Fixed "slow and unresponsive" session: In web/guac/consumers.py, wrapped blocking GuacamoleClient methods (handshake and send) with sync_to_async. This prevents the synchronous calls from blocking the ASGI
event loop, which was causing the lag and crashes.
3. Prevented infinite loops: Updated the open method in web/guac/consumers.py to correctly handle GuacamoleClient disconnection (EOF) by breaking the receive loop and closing the WebSocket, preventing high CPU
usage on disconnect.
The files web/web/asgi.py and web/guac/consumers.py have been updated and syntax checked.
```
* Apply suggestion from @gemini-code-assist[bot]
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* add daphne
* fix
* more fixes?
* fix
* fix
* sync
* Update consumers.py
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent 5bce5a6 commit ae1739f
7 files changed
Lines changed: 214 additions & 145 deletions
File tree
- conf/default
- web
- guac
- web
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
206 | 223 | | |
207 | 224 | | |
208 | 225 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments