corrected some issues
flavien's git/Projet_JAVA_P2P_STRI2A/pipeline/head There was a failure building this commit Details

pull/32/head
Flavien Haas 5 years ago
parent 294415b644
commit 98c6a8cf92

@ -21,6 +21,7 @@ import java.nio.file.Files;
import java.io.File;
import java.nio.file.Paths;
import java.io.IOException;
import exception.SocketClosed;
/** Class to download file parts on tcp.
* @author Louis Royer
@ -48,7 +49,7 @@ public class ClientDownloadPartTCP implements Runnable {
* @param socket socket to use
* @param partsSubdir directory to store .part files
*/
public ClientDownloadPartTCP(ClientDownloadTCP manager, String filename, DatagramSocket socket, String partsSubdir) {
public ClientDownloadPartTCP(ClientDownloadTCP manager, String filename, Socket socket, String partsSubdir) {
this.manager = manager;
this.partsSubdir = partsSubdir;
this.filename = filename;
@ -299,6 +300,9 @@ public class ClientDownloadPartTCP implements Runnable {
} catch (InternalError e) {
System.err.println("Error: downloadPart internalError");
return true;
} catch (SocketClosed e){
System.err.println("Error: downloadPart SocketClosed");
return true;
}
return false;
}

Loading…
Cancel
Save