From 92f451c61cb1a78af1b82d994b49ea4128faab2b Mon Sep 17 00:00:00 2001 From: liaoxingxing Date: Thu, 6 Feb 2025 11:44:27 +0800 Subject: [PATCH] modify invalid fd log by adding macro control Signed-off-by: liaoxingxing --- src/unix/linux.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/unix/linux.c b/src/unix/linux.c index 7514876..ab94fe2 100644 --- a/src/unix/linux.c +++ b/src/unix/linux.c @@ -1546,7 +1546,11 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { * Ignore all errors because we may be racing with another thread * when the file descriptor is closed. */ - UV_LOGF("fd %{public}d don't belong to loop %{public}zu", fd, (size_t)loop); +#ifdef USE_FFRT + if (ffrt_get_cur_task() != NULL) { + UV_LOGF("fd %{public}d don't belong to loop %{public}zu", fd, (size_t)loop); + } +#endif uv__epoll_ctl_prep(epollfd, ctl, &prep, EPOLL_CTL_DEL, fd, pe); continue; } -- Gitee