0
0
Fork 0
mirror of https://github.com/YTVanced/VancedMicroG synced 2024-11-24 12:15:12 +00:00

Merge pull request #77 from michitux/teardown_fixes

Fixes for connectivity issues
This commit is contained in:
Marvin W 2016-01-18 10:19:55 +01:00
commit 381da4b2b3
2 changed files with 2 additions and 1 deletions

View file

@ -77,6 +77,7 @@ public class McsInputStream extends Thread {
mainHandler.dispatchMessage(mainHandler.obtainMessage(MSG_INPUT, msg));
} else {
mainHandler.dispatchMessage(mainHandler.obtainMessage(MSG_TEARDOWN, "null message"));
break; // if input is empty, do not continue looping
}
}
} catch (IOException e) {

View file

@ -323,7 +323,7 @@ public class McsService extends Service implements Handler.Callback {
private void sendOutputStream(int what, Object obj) {
McsOutputStream os = outputStream;
if (os != null) {
if (os != null && os.isAlive()) {
Handler outputHandler = os.getHandler();
if (outputHandler != null)
outputHandler.sendMessage(outputHandler.obtainMessage(what, obj));