Skip to content

Commit

Permalink
join configuration change thread from main thread to prevent 'Runtime…
Browse files Browse the repository at this point in the history
…Error: can't create new thread at interpreter shutdown' (#18)

Co-authored-by: James Hasbrouck <[email protected]>
  • Loading branch information
jamhabr and James Hasbrouck authored Sep 19, 2024
1 parent 2c22185 commit 5fdf556
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions greengrass_defender_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ def main():

# Subscribe to the subsequent configuration changes
ipc_client.subscribe_to_config_updates()
Thread(
configChangeThread = Thread(
target=wait_for_config_changes,
args=(ipc_client, metrics_collector),
).start()
)
configChangeThread.start()
configChangeThread.join()

0 comments on commit 5fdf556

Please sign in to comment.