[CLIENT] Ajout d'un catch de ConnectException dans la clss HttpTextSender; Ajout d'un todo à cet endroit

This commit is contained in:
Notmoo-PC\Notmoo 2018-01-23 18:07:09 +01:00
parent ed02c20be0
commit c146ecf55b

View File

@ -7,6 +7,7 @@ import java.io.BufferedReader;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.net.ConnectException;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import java.net.URL; import java.net.URL;
import java.net.URLEncoder; import java.net.URLEncoder;
@ -41,7 +42,8 @@ public class HttpTextSender implements ITextSender{
con.disconnect(); con.disconnect();
}catch (java.net.SocketTimeoutException e){ }catch (java.net.SocketTimeoutException | ConnectException e){
//TODO ajouter un log ici
listener.onTimeOutEvent(); listener.onTimeOutEvent();
}catch (IOException e) { }catch (IOException e) {
e.printStackTrace(); e.printStackTrace();