diff --git a/tor/torProvider.go b/tor/torProvider.go index a1e2748..bdc65e2 100644 --- a/tor/torProvider.go +++ b/tor/torProvider.go @@ -302,6 +302,7 @@ func (tp *torProvider) Listen(identity connectivity.PrivateKey, port int) (conne return nil, err } + // We need to set os.ID here, otherwise os.Close() may not shut down the onion service properly... os.ID = onion os.CloseLocalListenerOnClose = true