diff --git a/scripts/osmo_trap2cgi.py b/scripts/osmo_trap2cgi.py index ad66e7b..8aa7649 100755 --- a/scripts/osmo_trap2cgi.py +++ b/scripts/osmo_trap2cgi.py @@ -194,12 +194,12 @@ async def recon_reader(proxy, reader, num_bytes): async def ctrl_client(proxy, rd, wr): """ - Recursively read CTRL stream and handle selected messages. + Read CTRL stream and handle selected messages. """ - header = await recon_reader(proxy, rd, 4) - data = await recon_reader(proxy, rd, get_ctrl_len(proxy, header)) - proxy.dispatch(wr, data) - await ctrl_client(proxy, rd, wr) + while True: + header = await recon_reader(proxy, rd, 4) + data = await recon_reader(proxy, rd, get_ctrl_len(proxy, header)) + proxy.dispatch(wr, data) async def conn_client(proxy): """