moved a thing in a try block
flavien's git/Projet_JAVA_P2P_STRI2A/pipeline/head This commit looks good Details

pull/32/head
Flavien Haas 5 years ago
parent 9bcdfaa602
commit 1550c5bbbe

@ -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)) {

Loading…
Cancel
Save