From 99165eb5580b0cb3af1401a9dd641af867852300 Mon Sep 17 00:00:00 2001 From: David Hill Date: Thu, 22 Sep 2016 00:14:51 -0400 Subject: [PATCH] rpctest: Fix typo Use os.Getpid() to get the process ID, not os.Getppid(), which returns the parent process ID. This resulted in multiple calls to generateListeningAddresses() getting the same listening ports. --- rpctest/rpc_harness.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpctest/rpc_harness.go b/rpctest/rpc_harness.go index 9b53ed95..6fba7fc7 100644 --- a/rpctest/rpc_harness.go +++ b/rpctest/rpc_harness.go @@ -44,7 +44,7 @@ var ( // It should be noted however that there is still some small probability // that there will be port collisions either due to other processes // running or simply due to the stars aligning on the process IDs. - processID = os.Getppid() + processID = os.Getpid() // testInstances is a private package-level slice used to keep track of // all active test harnesses. This global can be used to perform