From cf808c03ba4cd6d9149e2ae133c88b1335dceafe Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Sun, 25 Mar 2018 21:59:47 +0200 Subject: [PATCH] Add timeout so handshake doesn't block forever --- src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java b/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java index dc3533e6..587b7b67 100644 --- a/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java +++ b/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java @@ -183,6 +183,7 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis void configureSocket(Socket socket) { try { socket.setKeepAlive(true); + socket.setSoTimeout(1000); } catch (SocketException e) { e.printStackTrace(); }