mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 12:03:02 +00:00
Close the ENet connection only after threads that might be using it have been killed
This commit is contained in:
parent
d75e42e23d
commit
a8c460e715
@ -242,12 +242,6 @@ public class ControlStream implements ConnectionStatusListener, InputPacketSende
|
|||||||
} catch (IOException e) {}
|
} catch (IOException e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enetConnection != null) {
|
|
||||||
try {
|
|
||||||
enetConnection.close();
|
|
||||||
} catch (IOException e) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lossStatsThread != null) {
|
if (lossStatsThread != null) {
|
||||||
lossStatsThread.interrupt();
|
lossStatsThread.interrupt();
|
||||||
|
|
||||||
@ -263,6 +257,12 @@ public class ControlStream implements ConnectionStatusListener, InputPacketSende
|
|||||||
resyncThread.join();
|
resyncThread.join();
|
||||||
} catch (InterruptedException e) {}
|
} catch (InterruptedException e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (enetConnection != null) {
|
||||||
|
try {
|
||||||
|
enetConnection.close();
|
||||||
|
} catch (IOException e) {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() throws IOException
|
public void start() throws IOException
|
||||||
|
Loading…
x
Reference in New Issue
Block a user