From a235d3b0e2116e1d91e2b3303a7662a94758e10a Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Mon, 15 Jul 2019 16:28:03 -0500 Subject: [PATCH] Work around Marinetti bug where TCPIPReadLineTCP could incorrectly return an error value. This should now be fixed in the latest Marinetti, but we'll keep the workaround to minimize the chance of problems. --- http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/http.c b/http.c index b14dbcf..19c3804 100644 --- a/http.c +++ b/http.c @@ -149,11 +149,12 @@ netRetry: LongWord startTime = GetTick(); do { TCPIPPoll(); + u.rlrBuff.rlrBuffCount = 0; tcpError = TCPIPReadLineTCP(sess->ipid, (void*)((LongWord)"\p\r\n\r\n" | 0x80000000), buffTypeNewHandle, (Ref)NULL, 0xFFFFFF, &u.rlrBuff); - if (tcpError || toolerror()) { + if ((tcpError && u.rlrBuff.rlrBuffCount == 0) || toolerror()) { if (netErrors == 0) { netErrors++; goto netRetry;