From d1e985bea864d46f3b310da8fe6c31aee3137658 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Tue, 7 Oct 2014 14:15:32 +0300 Subject: [PATCH] Do not stop LongPollRunnable on SSLException This should fix bug 20 --- src/ro/ieval/fonbot/FonBotMainService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ro/ieval/fonbot/FonBotMainService.java b/src/ro/ieval/fonbot/FonBotMainService.java index 8bc69ae..9fb7145 100644 --- a/src/ro/ieval/fonbot/FonBotMainService.java +++ b/src/ro/ieval/fonbot/FonBotMainService.java @@ -8,6 +8,8 @@ import java.util.Collections; import java.util.EnumSet; import java.util.Set; +import javax.net.ssl.SSLException; + import org.eclipse.jdt.annotation.Nullable; import ro.ieval.fonbot.Address.Protocol; @@ -82,6 +84,8 @@ public final class FonBotMainService extends Service { runnable.doRun(); } catch (final SocketTimeoutException e){ Log.d("LongPollRunnable", "Socket timeout, refreshing connection"); + } catch (final SSLException e){ + Log.d("LongPollRunnable", "Got SSLException, refreshing connection"); } catch (final Exception ex){ ex.printStackTrace(); break; -- 2.30.2