mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-30 14:00:12 +03:00
asyncio.get_running_loop() raises RuntimeError when emit() is called from a thread without an active event loop (e.g. when the disk space check in project_manager triggers a log.warning notification from a threadpool worker). This causes a 500 Internal Server Error on project creation/open when disk usage is high, instead of the intended warning notification. Wrap the emit loop in try/except RuntimeError so that notifications are silently dropped when no event loop is available, rather than crashing the request. Fixes #2502 Fixes #2505