mirror of
https://github.com/langgenius/dify.git
synced 2026-09-08 11:04:27 +08:00
Socket.IO event handlers run in plain gevent greenlets without a Flask application context, so the db.session() call added in #38227 raises RuntimeError: Working outside of application context, and every user_connect is rejected as unauthorized. Wrap the authorization call in sio.app.app_context(), matching the existing connect handler. |
||
|---|---|---|
| .. | ||
| common | ||
| console | ||
| files | ||
| inner_api | ||
| mcp | ||
| openapi | ||
| service_api | ||
| trigger | ||
| web | ||
| __init__.py | ||
| API_SCHEMA_GUIDE.md | ||
| fastopenapi.py | ||