Skip to content

Commit 906b879

Browse files
committed
Don't forget to shutdown the S3 client after successful calls, too
See #43 (comment)
1 parent 87fc74a commit 906b879

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/libhostmgr/S3Manager.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ public struct S3Manager: S3ManagerProtocol {
135135
try await awsClient.shutdown()
136136
throw error
137137
}
138+
139+
// We need to shutdown the client also when `block` run successfully.
140+
//
141+
// This duplication with the call above will disappear once Swift will
142+
// give us a way to call `defer`.
143+
try await awsClient.shutdown()
144+
138145
return result
139146
}
140147

0 commit comments

Comments
 (0)