[tor-commits] [tor] 03/07: Only terminate PT processes that are running.
gitolite role
git at cupani.torproject.org
Thu May 25 14:53:04 UTC 2023
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main
in repository tor.
commit 3338b34ec9e57ffe57929f9cf67ae7f5e8f841be
Author: Alexander Færøy <ahf at torproject.org>
AuthorDate: Fri Sep 24 16:07:21 2021 +0200
Only terminate PT processes that are running.
See: tpo/core/tor#33669
---
src/feature/client/transports.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/feature/client/transports.c b/src/feature/client/transports.c
index e8f0ed543f..95c9cfeba2 100644
--- a/src/feature/client/transports.c
+++ b/src/feature/client/transports.c
@@ -519,8 +519,10 @@ proxy_prepare_for_restart(managed_proxy_t *mp)
tor_assert(mp->conf_state == PT_PROTO_COMPLETED);
/* destroy the process handle and terminate the process. */
- process_set_data(mp->process, NULL);
- process_terminate(mp->process);
+ if (mp->process) {
+ process_set_data(mp->process, NULL);
+ process_terminate(mp->process);
+ }
/* destroy all its registered transports, since we will no longer
use them. */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tor-commits
mailing list