added execptions
Some checks failed
flavien's git/Projet_JAVA_P2P_STRI2A/pipeline/head There was a failure building this commit

This commit is contained in:
Flavien Haas 2020-03-18 15:59:34 +01:00
parent 6af7cd5c7f
commit ecb007584a

View File

@ -97,7 +97,11 @@ public class ClientDownloadPartTCP implements Runnable {
} }
} }
System.err.println("Closing socket"); System.err.println("Closing socket");
try{
socket.close(); socket.close();
} catch(IOException e){
System.err.println("can't close socket");
}
} }
/** Get list of offsets that have not be downloaded if failed, else /** Get list of offsets that have not be downloaded if failed, else
@ -216,6 +220,9 @@ public class ClientDownloadPartTCP implements Runnable {
e.printStackTrace(); e.printStackTrace();
System.err.println("Error: reqPart ioexception"); System.err.println("Error: reqPart ioexception");
return null; return null;
} catch (SocketClosed e){
System.err.println("Error: reqPart SocketClosed");
return null;
} }
} }