From ed7ab34940bafdfc316166d5abf2612b20a394f3 Mon Sep 17 00:00:00 2001 From: slguan Date: Mon, 5 Aug 2019 13:35:23 +0800 Subject: [PATCH] fix the issue #279 --- src/modules/http/src/httpServer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/http/src/httpServer.c b/src/modules/http/src/httpServer.c index 48a8faf5fd..5bd3a5122a 100644 --- a/src/modules/http/src/httpServer.c +++ b/src/modules/http/src/httpServer.c @@ -96,9 +96,9 @@ void httpFreeContext(HttpServer *pServer, HttpContext *pContext) { void httpCleanUpContextTimer(HttpContext *pContext) { if (pContext->readTimer != NULL) { - taosTmrStopA(pContext->readTimer); + taosTmrStopA(&pContext->readTimer); pContext->readTimer = NULL; - httpTrace("context:%p, fd:%d, ip:%s, close read timer", pContext, pContext->fd, pContext->ipstr); + httpTrace("context:%p, fd:%d, ip:%s, close readTimer:%p", pContext, pContext->fd, pContext->ipstr, pContext->readTimer); } } @@ -228,7 +228,7 @@ void httpCloseContextByServer(HttpThread *pThread, HttpContext *pContext) { void httpCloseContextByServerFromTimer(void *param, void *tmrId) { HttpContext *pContext = (HttpContext *)param; - httpError("context:%p, fd:%d, ip:%s, read http body error, time expired", pContext, pContext->fd, pContext->ipstr); + httpError("context:%p, fd:%d, ip:%s, read http body error, time expired, readTimer:%p", pContext, pContext->fd, pContext->ipstr, tmrId); httpSendErrorResp(pContext, HTTP_PARSE_BODY_ERROR); httpCloseContextByServer(pContext->pThread, pContext); } @@ -345,8 +345,8 @@ bool httpReadData(HttpThread *pThread, HttpContext *pContext) { int ret = httpCheckReadCompleted(pContext); if (ret == HTTP_CHECK_BODY_CONTINUE) { - httpTrace("context:%p, fd:%d, ip:%s, not finished yet, try another times", pContext, pContext->fd, pContext->ipstr); taosTmrReset(httpCloseContextByServerFromTimer, HTTP_EXPIRED_TIME, pContext, pThread->pServer->timerHandle, &pContext->readTimer); + httpTrace("context:%p, fd:%d, ip:%s, not finished yet, try another times, readTimer:%p", pContext, pContext->fd, pContext->ipstr, pContext->readTimer); return false; } else if (ret == HTTP_CHECK_BODY_SUCCESS){ httpCleanUpContextTimer(pContext); -- GitLab