Fix crash when no server connected to tracker yet
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
4ba3055289
commit
9d4c98c466
@ -182,6 +182,9 @@ public abstract class ClientManagement extends ServeErrors implements Runnable {
|
||||
* @throws VersionRemoteError
|
||||
*/
|
||||
protected String[] listDirectory() throws EmptyDirectory, InternalError, UnknownHostException, IOException, TransmissionError, ProtocolError, VersionError, SizeError, InternalRemoteError, ProtocolRemoteError, VersionRemoteError {
|
||||
if (hostList.size() == 0) {
|
||||
return new String[0];
|
||||
}
|
||||
ProtocolP2PPacket<?> d = createProtocolP2PPacket(new Payload(RequestResponseCode.LIST_REQUEST));
|
||||
try {
|
||||
d.sendRequest(getHostItemSocket(hostList.get(0)));
|
||||
|
Loading…
Reference in New Issue
Block a user