1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-02-18 15:06:03 +01:00

Reset app protocol if not recognized for recovery

This commit is contained in:
Gregor Baues 2020-10-28 13:20:04 +01:00
parent 2e09c9965d
commit 003cb95591

View File

@ -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)