1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-13 09:30:54 +00:00

Add timeout for waiting watchdog observer thread to complete

This commit is contained in:
grossmj 2024-12-31 17:24:19 +07:00
parent 82779d816f
commit b39c7541fb
No known key found for this signature in database
GPG Key ID: 1E7DD6DBB53FF3D7

View File

@ -214,7 +214,7 @@ async def monitor_images_on_filesystem(app: FastAPI):
# stop when the app is exiting # stop when the app is exiting
if app.state.exiting: if app.state.exiting:
observer.stop() observer.stop()
observer.join() observer.join(10)
log.info(f"Stopping monitoring for new images in '{path}'") log.info(f"Stopping monitoring for new images in '{path}'")
loop.call_soon_threadsafe(queue.put_nowait, None) loop.call_soon_threadsafe(queue.put_nowait, None)
break break