diff options
| author | luwenpeng <[email protected]> | 2021-08-02 11:22:31 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2021-08-02 11:40:21 +0800 |
| commit | be8de2eaf4da5f80ff722baf0456ca36c0ebd4f0 (patch) | |
| tree | f5d6dc7dfc22487cefeeb29f3425426b909e4671 | |
| parent | 67be58f6ea817974d82ba04febbccdfe9edaad13 (diff) | |
TSG-7248 修改Proxy内部watchdog的处理逻辑,创建worker线程时便更新时间戳v4.5.8-202107
| -rw-r--r-- | platform/src/proxy.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/src/proxy.cpp b/platform/src/proxy.cpp index 3764b65..acdd45d 100644 --- a/platform/src/proxy.cpp +++ b/platform/src/proxy.cpp @@ -341,6 +341,11 @@ 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]; + + 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); if (unlikely(ret < 0)) { |
