corrected some issues
Some checks failed
flavien's git/Projet_JAVA_P2P_STRI2A/pipeline/head There was a failure building this commit
Some checks failed
flavien's git/Projet_JAVA_P2P_STRI2A/pipeline/head There was a failure building this commit
This commit is contained in:
parent
294415b644
commit
98c6a8cf92
@ -21,6 +21,7 @@ import java.nio.file.Files;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import exception.SocketClosed;
|
||||||
|
|
||||||
/** Class to download file parts on tcp.
|
/** Class to download file parts on tcp.
|
||||||
* @author Louis Royer
|
* @author Louis Royer
|
||||||
@ -48,7 +49,7 @@ public class ClientDownloadPartTCP implements Runnable {
|
|||||||
* @param socket socket to use
|
* @param socket socket to use
|
||||||
* @param partsSubdir directory to store .part files
|
* @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.manager = manager;
|
||||||
this.partsSubdir = partsSubdir;
|
this.partsSubdir = partsSubdir;
|
||||||
this.filename = filename;
|
this.filename = filename;
|
||||||
@ -299,6 +300,9 @@ public class ClientDownloadPartTCP implements Runnable {
|
|||||||
} catch (InternalError e) {
|
} catch (InternalError e) {
|
||||||
System.err.println("Error: downloadPart internalError");
|
System.err.println("Error: downloadPart internalError");
|
||||||
return true;
|
return true;
|
||||||
|
} catch (SocketClosed e){
|
||||||
|
System.err.println("Error: downloadPart SocketClosed");
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user