From ef6bbdff17c2728a49ea414511e1d6a7cb4980f9 Mon Sep 17 00:00:00 2001 From: Jude Nelson Date: Thu, 12 Oct 2017 17:12:13 -0400 Subject: [PATCH] properly use rpc_port --- blockstack/blockstackd.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/blockstack/blockstackd.py b/blockstack/blockstackd.py index f22c04638..2dbec5288 100644 --- a/blockstack/blockstackd.py +++ b/blockstack/blockstackd.py @@ -2274,8 +2274,10 @@ def stop_server( clean=False, kill=False ): os.abort() # is it actually dead? + blockstack_opts = get_blockstack_opts() + srv = blockstack_client.proxy.BlockstackRPCClient('localhost', blockstack_opts['rpc_port'], timeout=5, protocol = 'http') try: - res = blockstack_client.ping() + res = blockstack_client.ping(proxy=srv) except socket.error as se: # dead? if se.errno == errno.ECONNREFUSED: @@ -2982,10 +2984,11 @@ def run_blockstackd(): if args.port is not None: log.info("Binding on port %s" % int(args.port)) + args.port = int(args.port) else: - args.port = RPC_SERVER_PORT + args.port = None - exit_status = run_server( foreground=args.foreground, expected_snapshots=expected_snapshots, port=int(args.port) ) + exit_status = run_server( foreground=args.foreground, expected_snapshots=expected_snapshots, port=args.port ) if args.foreground: log.info("Service endpoint exited with status code %s" % exit_status )