diff options
| author | 彭宣正 <[email protected]> | 2021-06-03 10:17:45 +0800 |
|---|---|---|
| committer | 彭宣正 <[email protected]> | 2021-06-03 11:43:05 +0800 |
| commit | a8573f53cb510325004f5bc1455034ebb86c58aa (patch) | |
| tree | 4c59ef3e64eef21a8a7bc62b38185dde04811f45 | |
| parent | da3bc1db06ef3ecd2aa76ffe58e5b14e5828f3c7 (diff) | |
修复可能会起多个fd管理线程的bugv1.0.26
| -rw-r--r-- | src/hos_client.cpp | 8 |
1 files 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<std::mutex> 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; |
