moved a thing in a try block
All checks were successful
flavien's git/Projet_JAVA_P2P_STRI2A/pipeline/head This commit looks good
All checks were successful
flavien's git/Projet_JAVA_P2P_STRI2A/pipeline/head This commit looks good
This commit is contained in:
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…
Reference in New Issue
Block a user