aboutsummaryrefslogtreecommitdiff
path: root/weed/util/file_util_test.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-10-20 22:15:52 -0700
committerGitHub <noreply@github.com>2025-10-20 22:15:52 -0700
commit34054ed91031479a61f8f83795413ef45566d1b3 (patch)
treedc35e39e313c944167ee6dbb2c091b951fb77c2e /weed/util/file_util_test.go
parent82fbf15b711f101bff00e0776c9352c26502cbb2 (diff)
downloadseaweedfs-34054ed91031479a61f8f83795413ef45566d1b3.tar.xz
seaweedfs-34054ed91031479a61f8f83795413ef45566d1b3.zip
Fix deadlock in worker client Connect() method (#7350)
The Connect() method was holding a write lock via defer for its entire duration, including when calling attemptConnection(). This caused a deadlock because attemptConnection() tries to acquire a read lock at line 119 to access c.lastWorkerInfo. The fix removes the defer unlock pattern and manually releases the lock after checking the connected state but before calling attemptConnection(). This allows attemptConnection() to acquire its own locks without deadlock. Fixes #7192
Diffstat (limited to 'weed/util/file_util_test.go')
0 files changed, 0 insertions, 0 deletions