mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 05:37:43 +00:00
Add timeout so handshake doesn't block forever
This commit is contained in:
parent
2b52cd1547
commit
cf808c03ba
@ -183,6 +183,7 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis
|
|||||||
void configureSocket(Socket socket) {
|
void configureSocket(Socket socket) {
|
||||||
try {
|
try {
|
||||||
socket.setKeepAlive(true);
|
socket.setKeepAlive(true);
|
||||||
|
socket.setSoTimeout(1000);
|
||||||
} catch (SocketException e) {
|
} catch (SocketException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user