不cache包含Set-cookie的应答。修改多处日志细节。
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/un.h>
|
||||
#include <assert.h>
|
||||
@@ -14,6 +15,7 @@
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
|
||||
|
||||
#include <event2/event.h>
|
||||
#include <event2/listener.h>
|
||||
#include <event2/bufferevent.h>
|
||||
@@ -135,6 +137,7 @@ void tfe_proxy_free(tfe_proxy * ctx)
|
||||
|
||||
static void __dummy_event_handler(evutil_socket_t fd, short what, void * arg)
|
||||
{
|
||||
printf("%s alive\n",__FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -172,7 +175,7 @@ static void __gc_handler_cb(evutil_socket_t fd, short what, void * arg)
|
||||
return;
|
||||
}
|
||||
|
||||
static void * __thread_ctx_entry(void * arg)
|
||||
static void * tfe_work_thread(void * arg)
|
||||
{
|
||||
struct tfe_thread_ctx * ctx = (struct tfe_thread_ctx *) arg;
|
||||
struct timeval timer_delay = {60, 0};
|
||||
@@ -187,11 +190,15 @@ static void * __thread_ctx_entry(void * arg)
|
||||
evtimer_add(ev, &timer_delay);
|
||||
ctx->running = 1;
|
||||
__currect_thread_id = ctx->thread_id;
|
||||
char thread_name[16];
|
||||
snprintf(thread_name, sizeof(thread_name), "tfe:worker%d", ctx->thread_id);
|
||||
prctl(PR_SET_NAME,(unsigned long long)thread_name,NULL,NULL,NULL);
|
||||
|
||||
TFE_LOG_INFO(g_default_logger, "Thread %u is running...", ctx->thread_id);
|
||||
TFE_LOG_INFO(g_default_logger, "Work thread %u is running...", ctx->thread_id);
|
||||
event_base_dispatch(ctx->evbase);
|
||||
assert(0);
|
||||
event_free(ev);
|
||||
|
||||
TFE_LOG_ERROR(g_default_logger, "Work thread %u is exit...", ctx->thread_id);
|
||||
return (void *)NULL;
|
||||
}
|
||||
|
||||
@@ -215,7 +222,7 @@ int tfe_proxy_work_thread_run(struct tfe_proxy * proxy)
|
||||
for(i=0; i<proxy->nr_work_threads;i++)
|
||||
{
|
||||
__thread_ctx=proxy->work_threads[i];
|
||||
ret = pthread_create(&__thread_ctx->thr, NULL, __thread_ctx_entry, (void *)__thread_ctx);
|
||||
ret = pthread_create(&__thread_ctx->thr, NULL, tfe_work_thread, (void *)__thread_ctx);
|
||||
if (unlikely(ret < 0))
|
||||
{
|
||||
TFE_LOG_ERROR(proxy->logger, "Failed at pthread_create() for thread %d, error %d: %s", i, errno, strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user