From 7b879b36c6d8ec16424e3c918657b3a5c2042288 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Sun, 27 Dec 2015 22:33:08 +0100 Subject: [PATCH] soc/tools/remove/server: avoid closing server when client closes connection --- litex/soc/tools/remote/server.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/litex/soc/tools/remote/server.py b/litex/soc/tools/remote/server.py index dff47710..d455601c 100644 --- a/litex/soc/tools/remote/server.py +++ b/litex/soc/tools/remote/server.py @@ -32,9 +32,12 @@ class RemoteServer(EtherboneIPC): print("Connected with " + addr[0] + ":" + str(addr[1])) try: while True: - packet = self.receive_packet(client_socket) - if packet == 0: - break + try: + packet = self.receive_packet(client_socket) + if packet == 0: + break + except: + break packet = EtherbonePacket(packet) packet.decode() -- 2.30.2