2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 13:17:43 +00:00

Add timeout so handshake doesn't block forever

This commit is contained in:
Albert Vaca 2018-03-25 21:59:47 +02:00
parent 2b52cd1547
commit cf808c03ba

View File

@ -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();
}