We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62d016a commit 5453629Copy full SHA for 5453629
livereload/server.py
@@ -347,8 +347,12 @@ def opener():
347
try:
348
self.watcher._changes.append(('__livereload__', restart_delay))
349
LiveReloadHandler.start_tasks()
350
- add_reload_hook(lambda: IOLoop.instance().close(all_fds=True))
+ # When autoreload is triggered, initiate a shutdown of the IOLoop
351
+ add_reload_hook(lambda: IOLoop.instance().stop())
352
+ # The call to start() does not return until the IOLoop is stopped.
353
IOLoop.instance().start()
354
+ # Once the IOLoop is stopped, the IOLoop can be closed to free resources
355
+ IOLoop.current().close(all_fds=True)
356
except KeyboardInterrupt:
357
logger.info('Shutting down...')
358
0 commit comments