Skip to content
Permalink
Browse files

fix(control-sock): build control socket at the begining

  • Loading branch information...
numb3r3 committed Oct 15, 2019
1 parent 707d9e9 commit 474deddfc4358a82bd0e85ce10595dc1d3dbcee8
Showing with 4 additions and 2 deletions.
  1. +4 −2 gnes/service/base.py
@@ -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')))
@@ -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'),

0 comments on commit 474dedd

Please sign in to comment.
You can’t perform that action at this time.