Skip to content

Commit a6d6bff

Browse files
authored
fix: revert change from #2447 (#2804)
1 parent 5345636 commit a6d6bff

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

aws-android-sdk-s3/src/main/java/com/amazonaws/mobileconnectors/s3/transferutility/TransferThreadPool.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,22 @@
2626
import com.amazonaws.logging.LogFactory;
2727

2828
class TransferThreadPool {
29-
29+
3030
private static final Log LOGGER = LogFactory.getLog(TransferService.class);
3131

3232
private static ExecutorService executorMainTask;
3333
private static ExecutorService executorPartTask;
3434

3535
static synchronized void init(final int transferThreadPoolSize) {
3636
LOGGER.debug("Initializing the thread pool of size: " + transferThreadPoolSize);
37-
37+
3838
final int poolSize = Math.max((int) (Math.ceil((double) transferThreadPoolSize / 2)), 1);
39-
39+
4040
if (executorMainTask == null) {
4141
executorMainTask = buildExecutor(poolSize);
4242
}
4343
if (executorPartTask == null) {
44-
// Upload individual parts serially
45-
executorPartTask = buildExecutor(1);
44+
executorPartTask = buildExecutor(poolSize);
4645
}
4746
}
4847

0 commit comments

Comments
 (0)