Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,7 @@ private static class TrinoS3StreamingOutputStream
private byte[] buffer;
private int bufferSize;

private boolean closed;
private boolean failed;
// Mutated and read by main thread; mutated just before scheduling upload to background thread (access does not need to be thread safe)
private boolean multipartUploadStarted;
Expand Down Expand Up @@ -1548,6 +1549,11 @@ public void flush()
public void close()
throws IOException
{
if (closed) {
return;
}
closed = true;

if (failed) {
try {
abortUpload();
Expand Down