aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weed/storage/backend/s3_backend/s3_sessions.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/storage/backend/s3_backend/s3_sessions.go b/weed/storage/backend/s3_backend/s3_sessions.go
index ca3fc62fc..dfb0aa564 100644
--- a/weed/storage/backend/s3_backend/s3_sessions.go
+++ b/weed/storage/backend/s3_backend/s3_sessions.go
@@ -31,7 +31,8 @@ func createSession(awsAccessKeyId, awsSecretAccessKey, region, endpoint string,
sessionsLock.Lock()
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
}