Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

Commit 077693c

Browse files
author
jofriedm-msft
authored
Merge pull request #155 from dorfire/dev
Fixed wrongful 0ms retry intervals for upload attempts
2 parents ab5dbc0 + fc0c45a commit 077693c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

microsoft-azure-storage/src/com/microsoft/azure/storage/core/ExecutionEngine.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -97,25 +97,25 @@ public static <CLIENT_TYPE, PARENT_TYPE, RESULT_TYPE> RESULT_TYPE executeWithRet
9797
Logger.info(opContext, LogConstants.START_REQUEST, request.getURL(),
9898
request.getRequestProperty(Constants.HeaderConstants.DATE));
9999

100-
// 5. Potentially upload data
101-
if (task.getSendStream() != null) {
102-
Logger.info(opContext, LogConstants.UPLOAD);
103-
final StreamMd5AndLength descriptor = Utility.writeToOutputStream(task.getSendStream(),
104-
request.getOutputStream(), task.getLength(), false /* rewindStream */,
105-
false /* calculate MD5 */, opContext, task.getRequestOptions());
106-
107-
task.validateStreamWrite(descriptor);
108-
Logger.info(opContext, LogConstants.UPLOADDONE);
109-
}
100+
try {
101+
// 5. Potentially upload data
102+
if (task.getSendStream() != null) {
103+
Logger.info(opContext, LogConstants.UPLOAD);
104+
final StreamMd5AndLength descriptor = Utility.writeToOutputStream(task.getSendStream(),
105+
request.getOutputStream(), task.getLength(), false /* rewindStream */,
106+
false /* calculate MD5 */, opContext, task.getRequestOptions());
107+
108+
task.validateStreamWrite(descriptor);
109+
Logger.info(opContext, LogConstants.UPLOADDONE);
110+
}
110111

111-
Utility.logHttpRequest(request, opContext);
112+
Utility.logHttpRequest(request, opContext);
112113

113-
// 6. Process the request - Get response
114-
RequestResult currResult = task.getResult();
115-
currResult.setStartDate(new Date());
114+
// 6. Process the request - Get response
115+
RequestResult currResult = task.getResult();
116+
currResult.setStartDate(new Date());
116117

117-
Logger.info(opContext, LogConstants.GET_RESPONSE);
118-
try {
118+
Logger.info(opContext, LogConstants.GET_RESPONSE);
119119
currResult.setStatusCode(request.getResponseCode());
120120
currResult.setStatusMessage(request.getResponseMessage());
121121
}

0 commit comments

Comments
 (0)