Skip to content

Commit

Permalink
Re-add reset code lines to avoid confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
raphkim committed Mar 30, 2020
1 parent 07ea819 commit 7c1f810
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ public Boolean call() {
if (TransferState.PENDING_PAUSE.equals(download.state)) {
updater.updateState(download.id, TransferState.PAUSED);
LOGGER.info("Transfer is " + TransferState.PAUSED);
ProgressEvent resetEvent = new ProgressEvent(0);
resetEvent.setEventCode(ProgressEvent.RESET_EVENT_CODE);
progressListener.progressChanged(new ProgressEvent(0));
return false;
}
Expand All @@ -144,6 +146,8 @@ public Boolean call() {
*/
updater.updateState(download.id, TransferState.WAITING_FOR_NETWORK);
LOGGER.debug("Network Connection Interrupted: " + "Moving the TransferState to WAITING_FOR_NETWORK");
ProgressEvent resetEvent = new ProgressEvent(0);
resetEvent.setEventCode(ProgressEvent.RESET_EVENT_CODE);
progressListener.progressChanged(new ProgressEvent(0));
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ private Boolean uploadSinglePartAndWaitForCompletion() {
if (TransferState.PENDING_PAUSE.equals(upload.state)) {
updater.updateState(upload.id, TransferState.PAUSED);
LOGGER.info("Transfer is " + TransferState.PAUSED);
ProgressEvent resetEvent = new ProgressEvent(0);
resetEvent.setEventCode(ProgressEvent.RESET_EVENT_CODE);
progressListener.progressChanged(new ProgressEvent(0));
return false;
}
Expand All @@ -315,6 +317,8 @@ private Boolean uploadSinglePartAndWaitForCompletion() {
*/
updater.updateState(upload.id, TransferState.WAITING_FOR_NETWORK);
LOGGER.debug("Network Connection Interrupted: " + "Moving the TransferState to WAITING_FOR_NETWORK");
ProgressEvent resetEvent = new ProgressEvent(0);
resetEvent.setEventCode(ProgressEvent.RESET_EVENT_CODE);
progressListener.progressChanged(new ProgressEvent(0));
return false;
}
Expand Down

0 comments on commit 7c1f810

Please sign in to comment.