diff --git a/src/clientP2P/ClientManagementTCP.java b/src/clientP2P/ClientManagementTCP.java index 17e6a40..c7607a6 100644 --- a/src/clientP2P/ClientManagementTCP.java +++ b/src/clientP2P/ClientManagementTCP.java @@ -34,6 +34,7 @@ import protocolP2P.HashResponse; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import clientP2P.ClientDownloadTCP; +import exception.SocketClosed; /** Implementation of P2P-JAVA-PROJECT CLIENT * @author Louis Royer @@ -176,6 +177,9 @@ public class ClientManagementTCP implements Runnable { throw new ProtocolError(); } catch (EmptyFile e) { throw new ProtocolError(); + } catch (SocketClosed e){ + System.err.println("listDirectory : SocketClosed"); + throw new ProtocolError(); } }