From: Florent Kermarrec Date: Sun, 27 Dec 2015 21:33:08 +0000 (+0100) Subject: soc/tools/remove/server: avoid closing server when client closes connection X-Git-Tag: 24jan2021_ls180~2019 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b879b36c6d8ec16424e3c918657b3a5c2042288;p=litex.git soc/tools/remove/server: avoid closing server when client closes connection --- 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()