aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2019-10-19 21:07:05 +0200
committerChristian Schneppe <christian.schneppe@pix-art.de>2019-10-19 21:07:05 +0200
commit5a3f721eb469b04432e3fe5d07c90eca1ebcdba7 (patch)
treeb1fe29522693bbe5d72a671ab98fb7eea5f3fac1 /src
parent6a4b714e1082a12f297ad8d7d6b3109717718654 (diff)
catch exception while setting useragent
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java b/src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java
index 6922ab96b..bd92c886d 100644
--- a/src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java
+++ b/src/main/java/de/pixart/messenger/services/ChannelDiscoveryService.java
@@ -49,7 +49,11 @@ public class ChannelDiscoveryService {
throw new RuntimeException("Unable to use Tor proxy", e);
}
}
- builder.networkInterceptors().add(new UserAgentInterceptor(service.getIqGenerator().getUserAgent()));
+ try {
+ builder.networkInterceptors().add(new UserAgentInterceptor(service.getIqGenerator().getUserAgent()));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
Retrofit retrofit = new Retrofit.Builder()
.client(builder.build())
.baseUrl(Config.CHANNEL_DISCOVERY)