From 051930c076f9935331121645f3d1331a04adfa5b Mon Sep 17 00:00:00 2001 From: Jeremy Rand Date: Wed, 23 Mar 2022 23:21:13 -0400 Subject: [PATCH] Clear the listening message if the connection drops. --- Listener/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Listener/main.c b/Listener/main.c index 02f709b..b412f9d 100644 --- a/Listener/main.c +++ b/Listener/main.c @@ -494,6 +494,7 @@ void handleAwaitingMsgHeaderState(void) if (srBuffer.srState != TCPSESTABLISHED) { closeConnection(); newState(LISTEN_STATE_AWAITING_CONNECTION); + globals->line2[0] = '\0'; return; } Word error = TCPIPReadTCP(globals->connIpid, 0, @@ -555,6 +556,7 @@ void handleAwaitingTextState(void) if (srBuffer.srState != TCPSESTABLISHED) { closeConnection(); newState(LISTEN_STATE_AWAITING_CONNECTION); + globals->line2[0] = '\0'; return; }