Skip to content

Commit

Permalink
Bulk Load CDK: Fix transient failure due to multiple channel closures (
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny-schmidt authored Oct 21, 2024
1 parent cfb6c5c commit d122510
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ class S3MultipartUpload<T : OutputStream>(

inner class UploadStream : OutputStream() {
override fun close() = runBlocking {
workQueue.send {
if (closeOnce.setOnce()) {
workQueue.close()
}
if (closeOnce.setOnce()) {
workQueue.send { workQueue.close() }
}
}

Expand Down

0 comments on commit d122510

Please sign in to comment.