From 1550c5bbbe6eda0242884b5a56846483372cb151 Mon Sep 17 00:00:00 2001 From: flavien Date: Wed, 18 Mar 2020 16:21:08 +0100 Subject: [PATCH] moved a thing in a try block --- src/clientP2P/ClientManagementTCP.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clientP2P/ClientManagementTCP.java b/src/clientP2P/ClientManagementTCP.java index c7607a6..66878c7 100644 --- a/src/clientP2P/ClientManagementTCP.java +++ b/src/clientP2P/ClientManagementTCP.java @@ -164,8 +164,8 @@ public class ClientManagementTCP implements Runnable { */ private String[] listDirectory() throws EmptyDirectory, InternalError, UnknownHostException, IOException, TransmissionError, ProtocolError, VersionError, SizeError, InternalRemoteError, ProtocolRemoteError, VersionRemoteError { ProtocolP2PPacketTCP d = new ProtocolP2PPacketTCP(new Payload(RequestResponseCode.LIST_REQUEST)); - d.sendRequest((Object)hostList.get(0).getTCPSocket()); try { + d.sendRequest((Object)hostList.get(0).getTCPSocket()); Payload p = d.receiveResponse().getPayload(); assert p instanceof FileList : "This payload must be instance of Filelist"; if (!(p instanceof FileList)) {