Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Commit

Permalink
Replace standard Java HTTP libraries with okHTTP (#237)
Browse files Browse the repository at this point in the history
* Replace standard Java HTTP libraries with okHTTP
  • Loading branch information
luguina authored Jun 1, 2020
1 parent be37abf commit baa8c68
Show file tree
Hide file tree
Showing 5 changed files with 229 additions and 312 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ dependencies {
compile 'org.simpleframework:simple-xml:2.7.1'
compile 'javax.xml.bind:jaxb-api:2.3.1'
implementation 'com.formdev:flatlaf:0.30'
implementation 'com.squareup.okhttp3:okhttp:4.7.2'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.7.2'
}

jar {
Expand Down
2 changes: 2 additions & 0 deletions src/com/sheepit/client/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,8 @@ private int downloadFile(Job ajob, String local_path, String md5_server, String

// must download the archive
int ret = this.server.HTTPGetFile(url, local_path, this.gui, update_ui);

// Try to check the download file even if a download error has occurred (MD5 file check will delete the file if partially downloaded)
boolean md5_check = this.checkFile(ajob, local_path, md5_server);
int attempts = 1;

Expand Down
Loading

0 comments on commit baa8c68

Please sign in to comment.