From 34cdce006bd0efaf78cb69d18ebebec6608b4f78 Mon Sep 17 00:00:00 2001 From: Tawn Kramer Date: Mon, 24 Aug 2020 20:19:58 -0700 Subject: [PATCH] better recovery --- gym_donkeycar/core/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gym_donkeycar/core/client.py b/gym_donkeycar/core/client.py index caecf2c7d..da08ae91b 100755 --- a/gym_donkeycar/core/client.py +++ b/gym_donkeycar/core/client.py @@ -134,7 +134,7 @@ def proc_msg(self, sock): if partial[0][0] == "{": assembled_packet = "".join(partial) assembled_packet = replace_float_notation(assembled_packet) - second_open = assembled_packet.find('{', 1) + second_open = assembled_packet.find('{"msg', 1) if second_open != -1: # hmm what to do? We have a partial packet. Trimming just # the good part and discarding the rest.