2
0
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:
Albert Vaca
2016-06-21 13:39:55 +02:00
parent f6c4084746
commit fec0b34330

View File

@@ -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