From: David ‘Bombe’ Roden Date: Mon, 23 Feb 2015 06:20:27 +0000 (+0100) Subject: Expose a connection uptime of 0 if connection is not yet established X-Git-Url: https://git.pterodactylus.net/?p=xudocci.git;a=commitdiff_plain;h=4df55ce548d957450159555f04f6b79c08a9fb69 Expose a connection uptime of 0 if connection is not yet established --- 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()