Browse Source

update s3 session cache key (#6923)

pull/6925/head
chalet 3 months ago
committed by GitHub
parent
commit
877b9b788a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      weed/storage/backend/s3_backend/s3_sessions.go

3
weed/storage/backend/s3_backend/s3_sessions.go

@ -31,7 +31,8 @@ func createSession(awsAccessKeyId, awsSecretAccessKey, region, endpoint string,
sessionsLock.Lock() sessionsLock.Lock()
defer sessionsLock.Unlock() defer sessionsLock.Unlock()
if t, found := s3Sessions[region]; found {
cacheKey := fmt.Sprintf("%s|%s", region, endpoint)
if t, found := s3Sessions[cacheKey]; found {
return t, nil return t, nil
} }

Loading…
Cancel
Save