Skip to content

Commit

Permalink
pool: fix numerical out-of-range error
Browse files Browse the repository at this point in the history
Motivation:

2 GiB may not be expressed as an integer.  Attempting to do so prevented
remote HTTP transfers.

Modification:

Ensure 2 GiB is represented by a long.

Result:

HTTP transfers work again.

An unreleased regression is fixed.

Target: master
Requires-notes: no
Requires-book: no
Patch: https://rb.dcache.org/r/11255/
Acked-by: Albert Rossi
  • Loading branch information
paulmillar committed Oct 15, 2018
1 parent 5392271 commit f97b471
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public class RemoteHttpDataTransferProtocol implements MoverProtocol,
* A guess on how long to retry a GET request. Since the file size is
* unknown, this value may be insufficient if the file is larger.
*/
private static final long GET_RETRY_DURATION = maxRetryDuration(GiB.toBytes(2));
private static final long GET_RETRY_DURATION = maxRetryDuration(GiB.toBytes(2L));
private static final String GET_RETRY_DURATION_DESCRIPTION = describeDuration(GET_RETRY_DURATION, MILLISECONDS);

/**
Expand Down

0 comments on commit f97b471

Please sign in to comment.