From c146ecf55b385172ff277643e4a8e498c67a01f1 Mon Sep 17 00:00:00 2001 From: "Notmoo-PC\\Notmoo" Date: Tue, 23 Jan 2018 18:07:09 +0100 Subject: [PATCH] =?UTF-8?q?[CLIENT]=20Ajout=20d'un=20catch=20de=20ConnectE?= =?UTF-8?q?xception=20dans=20la=20clss=20HttpTextSender;=20Ajout=20d'un=20?= =?UTF-8?q?todo=20=C3=A0=20cet=20endroit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pqt/client/module/connection/senders/HttpTextSender.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Workspace/client/src/main/java/com/pqt/client/module/connection/senders/HttpTextSender.java b/Workspace/client/src/main/java/com/pqt/client/module/connection/senders/HttpTextSender.java index d2eec194..f6efa9ee 100644 --- a/Workspace/client/src/main/java/com/pqt/client/module/connection/senders/HttpTextSender.java +++ b/Workspace/client/src/main/java/com/pqt/client/module/connection/senders/HttpTextSender.java @@ -7,6 +7,7 @@ import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; +import java.net.ConnectException; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; @@ -41,7 +42,8 @@ public class HttpTextSender implements ITextSender{ con.disconnect(); - }catch (java.net.SocketTimeoutException e){ + }catch (java.net.SocketTimeoutException | ConnectException e){ + //TODO ajouter un log ici listener.onTimeOutEvent(); }catch (IOException e) { e.printStackTrace();