mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-01 06:35:09 +00:00
Socket can't be null
This commit is contained in:
@@ -67,20 +67,12 @@ public class LanLink extends BaseLink {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disconnect() {
|
public void disconnect() {
|
||||||
|
|
||||||
Log.i("LanLink/Disconnect","socket:"+ socket.hashCode());
|
Log.i("LanLink/Disconnect","socket:"+ socket.hashCode());
|
||||||
|
|
||||||
if (socket == null) {
|
|
||||||
Log.w("KDE/LanLink", "Not yet connected");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
socket.close();
|
socket.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Returns the old socket
|
//Returns the old socket
|
||||||
|
Reference in New Issue
Block a user