Skip to content

Commit

Permalink
When linkTo() is called, reset current transferred counter
Browse files Browse the repository at this point in the history
  • Loading branch information
velitasali committed Sep 7, 2018
1 parent 32fb906 commit 800c532
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.genonbeta.coolsocket</groupId>
<artifactId>main</artifactId>
<version>1.0.1.4</version>
<version>1.0.1.5</version>
<name>CoolSocket</name>
<description>Socket implementation</description>
<url>https://github.com/genonbeta/CoolSocket</url>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/genonbeta/CoolSocket/CoolTransfer.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ public TransferProgress<T> getTransferProgress()

public TransferHandler<T> linkTo(TransferHandler<T> transferHandler)
{
if (transferHandler != null)
if (transferHandler != null) {
setTransferProgress(transferHandler.getTransferProgress());
getTransferProgress().resetCurrentTransferredByte();
}

return this;
}
Expand Down

0 comments on commit 800c532

Please sign in to comment.