From 4f54d55cc5203915825e00d6af517352a22d19e4 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Sun, 9 Dec 2018 13:48:37 +0100 Subject: [PATCH] Use one port more Summary: The desktop side goes as far up as 1764. Reviewers: #kde_connect, albertvaka Reviewed By: #kde_connect, albertvaka Subscribers: kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D17271 --- src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java b/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java index e929e479..8fff87a4 100644 --- a/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java +++ b/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java @@ -361,7 +361,7 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis static ServerSocket openServerSocketOnFreePort(int minPort) throws IOException { int tcpPort = minPort; - while (tcpPort < MAX_PORT) { + while (tcpPort <= MAX_PORT) { try { ServerSocket candidateServer = new ServerSocket(); candidateServer.bind(new InetSocketAddress(tcpPort));