diff --git a/ts3-client/core/src/main/java/com/ts3client/net/TeamspeakConnection.java b/ts3-client/core/src/main/java/com/ts3client/net/TeamspeakConnection.java index 83be9ae..c20fe82 100644 --- a/ts3-client/core/src/main/java/com/ts3client/net/TeamspeakConnection.java +++ b/ts3-client/core/src/main/java/com/ts3client/net/TeamspeakConnection.java @@ -63,6 +63,12 @@ public final class TeamspeakConnection implements TS3Listener { /** Shortest gap between two "you are talking while muted" reminders. */ private static final long MUTED_TALK_COOLDOWN_NANOS = 5_000_000_000L; + /** + * How long the handshake and initial download may take. That download includes the whole + * channel list, which on a big server over a lossy link (mobile data) takes a while. + */ + private static final long CONNECT_TIMEOUT_MS = 30_000L; + private final Settings settings; private final AudioBackend audio; private final ServerModel model = new ServerModel(); @@ -293,7 +299,7 @@ public final class TeamspeakConnection implements TS3Listener { ui.onStatus("Connecting to " + address + ":" + port + "…"); client.connect(new InetSocketAddress(address, port), (password == null || password.isEmpty()) ? null : password, - 10_000L); + CONNECT_TIMEOUT_MS); // Protocol connection established; anything past this point is best-effort. selfClientId = client.getClientId(); diff --git a/ts3j b/ts3j index b335c2c..45cb8fd 160000 --- a/ts3j +++ b/ts3j @@ -1 +1 @@ -Subproject commit b335c2c5115ee719207e3d157b6bc98f425c5a36 +Subproject commit 45cb8fd5595d01e0d54f511e31757ff04617e128