From 4df55ce548d957450159555f04f6b79c08a9fb69 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 23 Feb 2015 07:20:27 +0100 Subject: [PATCH] Expose a connection uptime of 0 if connection is not yet established --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index fab43ab..5b1b12d 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -202,7 +202,7 @@ public class Core extends AbstractExecutionThreadService { Connection connection = entry.getValue(); return new ConnectedNetwork(network, connection.hostname(), connection.port(), - connection.getUptime().get(), + connection.getUptime().orElse(Duration.ofSeconds(0)), connection.nickname(), channels.stream() .filter((channel) -> channel.network() -- 2.7.4