From a8573f53cb510325004f5bc1455034ebb86c58aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=AE=A3=E6=AD=A3?= Date: Thu, 3 Jun 2021 10:17:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=83=BD=E4=BC=9A?= =?UTF-8?q?=E8=B5=B7=E5=A4=9A=E4=B8=AAfd=E7=AE=A1=E7=90=86=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hos_client.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hos_client.cpp b/src/hos_client.cpp index 49d73c77..80c8207a 100644 --- a/src/hos_client.cpp +++ b/src/hos_client.cpp @@ -759,11 +759,13 @@ int hos_open_fd(hos_client_handle handle, const char *bucket, const char *object NULL,/*cache*/ handle->cache_count, 0,/*position*/ 0,/*recive_cnt*/(long)handle->cache_size,/*cache_rest*/ HOS_FD_REGISTER,/*fd_status*/ 0,/*overtime*/ handle->timeout,}; add_hos_info(&hash_hos_info[thread_id], &info); #if 1 - if (handle->fd_thread == 0) { std::lock_guard locker(m_client_lock); - handle->fd_thread_status = 0; - pthread_create(&handle->fd_thread, NULL, hos_fd_manage, handle); + if (handle->fd_thread == 0) + { + handle->fd_thread_status = 0; + pthread_create(&handle->fd_thread, NULL, hos_fd_manage, handle); + } } #endif return fd;