soc/tools/remove/server: avoid closing server when client closes connection
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Sun, 27 Dec 2015 21:33:08 +0000 (22:33 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Sun, 27 Dec 2015 21:33:08 +0000 (22:33 +0100)
litex/soc/tools/remote/server.py

index dff47710c5bfa31f6ed63ddacf0c72fa50496df1..d455601c7e1505c6ef63e56a26bd36297baa1f4e 100644 (file)
@@ -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()