From 003cb9559187bae668a32ca7418be75440aeb96e Mon Sep 17 00:00:00 2001 From: Gregor Baues Date: Wed, 28 Oct 2020 13:20:04 +0100 Subject: [PATCH] Reset app protocol if not recognized for recovery --- TransportProcessor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TransportProcessor.cpp b/TransportProcessor.cpp index d6ce15d..9cc3235 100644 --- a/TransportProcessor.cpp +++ b/TransportProcessor.cpp @@ -324,11 +324,12 @@ void echoProcessor(Connection *c, TransportProcessor *t) byte reply[MAX_ETH_BUFFER]; memset(reply, 0, MAX_ETH_BUFFER); - sprintf((char *)reply, "ERROR: malformed content in [%s]", t->buffer); + sprintf((char *)reply, "ERROR: malformed content in [%s]\n", t->buffer); if (c->client->connected()) { c->client->write(reply, strlen((char *)reply)); _sseq[c->id]++; + c->isProtocolDefined = false; // reset the protocol to not defined so that we can recover the next time } } void jmriProcessor(Connection *c, TransportProcessor *t)