From 3fc37006a104543f1d72c32442f6b235cc7aa926 Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Wed, 7 Jan 2026 16:24:57 -0500 Subject: [PATCH] simplehttp: Update event loop usage for Python 3.11+ --- simplehttp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simplehttp.py b/simplehttp.py index a168fec..0e23f04 100755 --- a/simplehttp.py +++ b/simplehttp.py @@ -8,7 +8,7 @@ import json import loganalyzer as analyze -loop = asyncio.get_event_loop() +loop = asyncio.new_event_loop() threadPool = futures.ThreadPoolExecutor(thread_name_prefix='loganalyzer: worker thread') app = web.Application() @@ -195,6 +195,7 @@ def main(): logging.info('Exiting application.') applicationTask.cancel() # Shuts down the HTTP server threadPool.shutdown() # Shuts down the running thread pool + loop.close() # Close the event loop if __name__ == '__main__':