fix port range arg
This commit is contained in:
parent
685ff6b02b
commit
aa6e53e2fa
@ -31,7 +31,13 @@ def ping(host, port, count=5, interval=1):
|
||||
_, msg = client.recv()
|
||||
recvtime = time()
|
||||
seq, msgtime, remotetime = msg.split(" ")
|
||||
print("ping(): < {} {} rtt: {:f}\n".format(_, seq, round(recvtime - float(msgtime), 8)))
|
||||
msgtime = float(msgtime)
|
||||
remotetime = float(remotetime)
|
||||
transittime = recvtime - msgtime
|
||||
# out = remotetime - msgtime
|
||||
# back = recvtime - remotetime
|
||||
# These aren't printed because clock sync imperfection makes them unreliable
|
||||
print("ping(): < {} {} rtt: {:f}\n".format(_, seq, round(transittime, 8)))
|
||||
|
||||
recv = Thread(target=ping_recver)
|
||||
recv.daemon = True
|
||||
|
@ -348,8 +348,9 @@ def main():
|
||||
with zmq.asyncio.Context() as ctx:
|
||||
loop = asyncio.get_event_loop()
|
||||
# loop.set_debug(True)
|
||||
port_range = (int(args.port_range[0]), int(args.port_range[1]))
|
||||
server = MsgBusServer(loop, ctx, args.bind_host, int(args.port), int(args.port) + 1,
|
||||
port_range=args.port_range, peers=args.peers if args.peers else [],
|
||||
port_range=port_range, peers=args.peers if args.peers else [],
|
||||
name=args.name)
|
||||
|
||||
def signal_handler(signum, stack):
|
||||
|
Loading…
Reference in New Issue
Block a user