TSG-7248 修改Proxy内部watchdog的处理逻辑,创建worker线程时便更新时间戳

This commit is contained in:
luwenpeng
2021-08-02 11:22:31 +08:00
parent 67be58f6ea
commit be8de2eaf4

View File

@@ -341,6 +341,11 @@ int tfe_proxy_work_thread_run(struct tfe_proxy * proxy)
for (i = 0; i < proxy->nr_work_threads; i++) for (i = 0; i < proxy->nr_work_threads; i++)
{ {
__thread_ctx = proxy->work_threads[i]; __thread_ctx = proxy->work_threads[i];
struct timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
ATOMIC_SET(&(__thread_ctx->lastime), now.tv_sec);
ret = pthread_create(&__thread_ctx->thr, NULL, tfe_work_thread, (void *) __thread_ctx); ret = pthread_create(&__thread_ctx->thr, NULL, tfe_work_thread, (void *) __thread_ctx);
if (unlikely(ret < 0)) if (unlikely(ret < 0))
{ {