| Index: tools/battor_agent/battor_connection_impl.cc
|
| diff --git a/tools/battor_agent/battor_connection_impl.cc b/tools/battor_agent/battor_connection_impl.cc
|
| index cf33c2ab97b18e1359f077f192117aae2840b6b5..d04f8c76fa2cfe00b9db34733e4586443f689236 100644
|
| --- a/tools/battor_agent/battor_connection_impl.cc
|
| +++ b/tools/battor_agent/battor_connection_impl.cc
|
| @@ -258,8 +258,10 @@ void BattOrConnectionImpl::OnBytesRead(int bytes_read,
|
|
|
| if (parse_message_error != ParseMessageError::NONE) {
|
| LogSerial(StringPrintf(
|
| - "Read failed due to the message containing an irrecoverable error: %d.",
|
| + "Read failed due to the message containing an irrecoverable error: %d, "
|
| + "clearing the pending read buffer.",
|
| parse_message_error));
|
| + already_read_buffer_.clear();
|
| EndReadBytes(false, BATTOR_MESSAGE_TYPE_CONTROL, nullptr);
|
| return;
|
| }
|
|
|