Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(control-sock): build control socket at the begining
  • Loading branch information
felix committed Oct 15, 2019
1 parent 707d9e9 commit 474dedd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gnes/service/base.py
Expand Up @@ -401,6 +401,9 @@ def _run(self, ctx):
self.handler.service_context = self
# print('!!!! t_id: %d service_context: %r' % (threading.get_ident(), self.handler.service_context))
self.logger.info('bind sockets...')
ctrl_sock, ctrl_addr = build_socket(ctx, self.default_host, self.args.port_ctrl, SocketType.PAIR_BIND)
self.logger.info('control over %s' % (colored(ctrl_addr, 'yellow')))

in_sock, _ = build_socket(ctx, self.args.host_in, self.args.port_in, self.args.socket_in,
self.args.identity)
self.logger.info('input %s:%s' % (self.args.host_in, colored(self.args.port_in, 'yellow')))
Expand All @@ -409,8 +412,7 @@ def _run(self, ctx):
self.args.identity)
self.logger.info('output %s:%s' % (self.args.host_out, colored(self.args.port_out, 'yellow')))

ctrl_sock, ctrl_addr = build_socket(ctx, self.default_host, self.args.port_ctrl, SocketType.PAIR_BIND)
self.logger.info('control over %s' % (colored(ctrl_addr, 'yellow')))

# self.logger.info(
# 'input %s:%s\t output %s:%s\t control over %s' % (
# self.args.host_in, colored(self.args.port_in, 'yellow'),
Expand Down

0 comments on commit 474dedd

Please sign in to comment.