提交 7bae0fae 编写于 作者: S Shengliang Guan

[TD-571] merge changes of 1.6

上级 20f95567
......@@ -73,6 +73,7 @@ bool httpParseTaosdAuthToken(HttpContext *pContext, char *token, int len) {
unsigned char *base64 = base64_decode(token, len, &outlen);
if (base64 == NULL || outlen == 0) {
httpError("context:%p, fd:%d, ip:%s, taosd token:%s parsed error", pContext, pContext->fd, pContext->ipstr, token);
if (base64) free(base64);
return false;
}
if (outlen != (TSDB_USER_LEN + TSDB_PASSWORD_LEN)) {
......
......@@ -68,7 +68,6 @@ bool httpInitContexts() {
}
void httpCleanupContexts() {
// TODO: wait until all context is closed
if (tsHttpServer.contextCache != NULL) {
SCacheObj *cache = tsHttpServer.contextCache;
httpPrint("context cache is cleanuping, size:%d", taosHashGetSize(cache->pHashTable));
......
......@@ -56,8 +56,9 @@ static void httpStopThread(HttpThread* pThread) {
void httpCleanUpConnect() {
HttpServer *pServer = &tsHttpServer;
pthread_join(pServer->thread, NULL);
if (pServer->pThreads == NULL) return;
pthread_join(pServer->thread, NULL);
for (int i = 0; i < pServer->numOfThreads; ++i) {
HttpThread* pThread = pServer->pThreads + i;
if (pThread != NULL) {
......@@ -195,9 +196,9 @@ static void httpProcessHttpData(void *param) {
for (int i = 0; i < fdNum; ++i) {
pContext = httpGetContext(events[i].data.ptr);
if (pContext == NULL) {
httpError("fd:%d, is already released, close connect", events[i].data.fd);
epoll_ctl(pThread->pollFd, EPOLL_CTL_DEL, pContext->fd, NULL);
tclose(events[i].data.fd);
httpError("context:%p, is already released, close connect", events[i].data.ptr);
//epoll_ctl(pThread->pollFd, EPOLL_CTL_DEL, events[i].data.fd, NULL);
//tclose(events[i].data.fd);
continue;
}
......
......@@ -49,7 +49,7 @@ if $rows != 0 then
endi
print =============== step4
sql create database a012345678901201234567890120123456789012 -x step4
sql create database a012345678901201234567890120123456789012a012345678901201234567890120123456789012 -x step4
return -1
step4:
sql show databases
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册