From c24049766c2f047b10f3cfc4c0e43b22aac17042 Mon Sep 17 00:00:00 2001 From: Koennecke Mark Date: Fri, 7 Nov 2014 14:00:12 +0100 Subject: [PATCH] Fixed a bug where sinqhttpopt would lock up on 0 length messages when in keep-alive --- sinqhttpopt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sinqhttpopt.c b/sinqhttpopt.c index ac1814a..4637de1 100644 --- a/sinqhttpopt.c +++ b/sinqhttpopt.c @@ -371,7 +371,11 @@ static int processHeader(Ascon *a) } DynStringCapacity(a->rdBuffer,pHttp->bytesExpected); - return 1; + if(pHttp->bytesExpected < 0){ + return 0; + } else { + return 1; + } } /*---------------------------------------------------------------------*/ static int HttpHandler(Ascon * a)