From e44f32fca79627bf5140f0d30ecfa477c95952f2 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Fri, 3 Oct 2025 06:47:56 +0300 Subject: [PATCH] pyflix: don't quit on any sendto error --- tools/pyflix/proxy.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/pyflix/proxy.py b/tools/pyflix/proxy.py index dbd1581..429867e 100755 --- a/tools/pyflix/proxy.py +++ b/tools/pyflix/proxy.py @@ -24,13 +24,16 @@ def main(): if addr in TARGETS: # packet from target if source_addr is None: continue - sock.sendto(data, source_addr) + try: + sock.sendto(data, source_addr) + packets += 1 + except: pass else: # packet from source source_addr = addr for target in TARGETS: sock.sendto(data, target) + packets += 1 - packets += 1 print(f'\rPackets: {packets}', end='') if __name__ == '__main__':