From 6a64f747912c257fb50ae25eea4b73fb0b3a6379 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Thu, 13 Feb 2025 10:13:28 +1100 Subject: [PATCH] Call t.join() to wait for the web thread to stop before cleaning up the onion. Seems to fix periodic race condition segfault --- cli/onionshare_cli/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/onionshare_cli/__init__.py b/cli/onionshare_cli/__init__.py index 0dffb493..c7ae8fd3 100644 --- a/cli/onionshare_cli/__init__.py +++ b/cli/onionshare_cli/__init__.py @@ -541,6 +541,7 @@ def main(cwd=None): finally: # Shutdown web.cleanup() + t.join() onion.cleanup()