Skip to content
Merged
Changes from 1 commit
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 @@ -1140,7 +1140,8 @@ private String buildDetailedErrorMsg(String string, int index) {
@Override
public void waitUntilDone() throws InterruptedIOException {
try {
waitUntilDone(Long.MAX_VALUE);
long cutoff = (EnvironmentEdgeManager.currentTime() + this.operationTimeout) * 1000L;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if operationTimeout here is negative(which means no timeout), or Long.MAX_VALUE?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if operationTimeout here is negative(which means no timeout), or Long.MAX_VALUE?

Good point, exclude that cases seems better, will fix later, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type of operationTimeout is int, so seems no need to consider Long.MAX_VALUE case.

waitUntilDone(cutoff);
} catch (InterruptedException iex) {
throw new InterruptedIOException(iex.getMessage());
} finally {
Expand Down